mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 14:43:33 +08:00
Proper C++ version detection
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user