c++-gtk-utils
|
Struct for automatic typing of parameter arguments for template functions. More...
#include <c++-gtk-utils/param.h>
Public Attributes | |
const typedef T & | ParamType |
Struct for automatic typing of parameter arguments for template functions.
This struct uses template partial specialisation in order to provide automatic type mapping for arguments for templated functions. It is used by callback object constructors, the unbound arguments of callback objects and their related functors and emitter objects, the Callback::make_ref() functions, the Thread::Future::make() functions and the DoIf::mem_fun() and DoIf::fun() functions. With Callback::make_ref(), Thread::Future::make(), DoIf::mem_fun() and DoIf::fun(), its use avoids errors arising from a template function being instantiated for a reference type, and also ensures that value arguments are passed by reference to const to avoid unnecessary copying.
Mapping is as follows:
A value argument is mapped to reference to const of the value type.
A pointer argument is mapped to pointer argument (its original type).
A non-const reference argument is mapped to non-const reference (its original type).
A const reference argument is mapped to const reference (its original type).
Since 1.2.10
const typedef T& Cgu::Param< T >::ParamType |