ParameterType<> template

This commit is contained in:
Pavel Kirienko
2015-05-16 13:21:53 +03:00
parent f713ef5e00
commit be5bcf9084
2 changed files with 27 additions and 21 deletions
@@ -100,6 +100,15 @@ template <typename T> struct RemoveReference<T&> { typedef T Type; };
template <typename T> struct RemoveReference<T&&> { typedef T Type; };
#endif
/**
* Parameter types
*/
template <typename U> struct ParameterType { typedef const U& Type; };
template <typename U> struct ParameterType<U&> { typedef U& Type; };
#if UAVCAN_CPP_VERSION > UAVCAN_CPP03
template <typename U> struct ParameterType<U&&> { typedef U&& Type; };
#endif
/**
* Value types
*/