|
DocWire SDK
DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, document analysis. Offline processing possible for security and confidentiality
|
Extracts the result type of a callable object. More...
#include <invocation_traits.h>
Public Types | |
| using | type = typename result_impl< T >::type |
| Type of the result of the callable object. More... | |
Extracts the result type of a callable object.
The result template provides a convenient way to access the result type of a callable object.
This template uses boost::callable_traits to extract the result type of T, unless T has a nested type invocation_result_t, in which case we use that type instead of relying on boost::callable_traits.
This is necessary because boost::callable_traits doesn't support all types of callable objects, like callables with auto arguments or functors with templated operator(). In this kind of situation functor class can provide public invocation_result_t type definiton with default operator() signature for other classes to use.
Using this template is better than using boost::callable_traits directly because it provides a fallback mechanism for cases where boost::callable_traits is not sufficient. This allows for more flexible and robust code.
| T | The type of the callable object. |
Definition at line 115 of file invocation_traits.h.
| using docwire::invocation_traits::result< T >::type = typename result_impl<T>::type |
Type of the result of the callable object.
This type is equal to boost::callable_traits::return_type_t<T> unless T has a nested type invocation_result_t, in which case we use that type instead of relying on boost::callable_traits.
Definition at line 141 of file invocation_traits.h.