#include <apibase.h>
This type trait yields T as its result type if T is a scalar type or a C++ reference type, otherwise const T&. It can be used for the declaration of parameters of template functions to avoid the inefficient use of const T& for scalar values. For the following function
a scalar value such as an Int is passed by value to Func, while a class value such as a Vector is passed as a const-reference const Vector&.
Public Types | |
using | type = typename std::conditional< value, T, typename std::add_lvalue_reference< typename std::add_const< T >::type >::type >::type |
Static Public Attributes | |
static const Bool | value |
using type = typename std::conditional<value, T, typename std::add_lvalue_reference<typename std::add_const<T>::type>::type>::type |
The result type.
|
static |