|
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 argument types of a callable object. More...
#include <invocation_traits.h>
Public Types | |
| using | type = typename args_impl< T >::type |
| Type of the arguments of the callable object. More... | |
Extracts the argument types of a callable object.
The args template provides a convenient way to access the argument types of a callable object.
This template uses boost::callable_traits to extract the argument types of T, unless T has a nested type invocation_args_t, in which case we use that type instead of relying on boost::callable_traits. If T has a nested type invocation_args_t, this specialization uses 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_args_t type definition 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 48 of file invocation_traits.h.
| using docwire::invocation_traits::args< T >::type = typename args_impl<T>::type |
Type of the arguments of the callable object.
This type is equal to boost::callable_traits::args_t<T> unless T has a nested type invocation_args_t, in which case we use that type instead of relying on boost::callable_traits.
Definition at line 74 of file invocation_traits.h.