Proper C++ version detection

This commit is contained in:
Pavel Kirienko
2014-03-17 20:38:02 +04:00
parent 06603ad237
commit 093328e386
4 changed files with 39 additions and 5 deletions
@@ -8,6 +8,10 @@
#include <uavcan/fatal_error.hpp>
#include <uavcan/impl_constants.hpp>
#ifndef UAVCAN_CPP_VERSION
# error UAVCAN_CPP_VERSION
#endif
namespace uavcan
{
@@ -31,7 +35,7 @@ class LazyConstructor
template <typename U> struct ParamType { typedef const U& Type; };
template <typename U> struct ParamType<U&> { typedef U& Type; };
#if __cplusplus > 201100
#if UAVCAN_CPP_VERSION >= UAVCAN_CPP11
template <typename U> struct ParamType<U&&> { typedef U&& Type; };
#endif