mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 18:03:35 +08:00
Proper C++ version detection
This commit is contained in:
@@ -16,6 +16,21 @@
|
||||
namespace uavcan
|
||||
{
|
||||
|
||||
/**
|
||||
* UAVCAN can be compiled in C++11 mode.
|
||||
* This macro allows to detect which version of the C++ standard is being used.
|
||||
*/
|
||||
#define UAVCAN_CPP11 2011
|
||||
#define UAVCAN_CPP03 2003
|
||||
|
||||
#if __cplusplus > 201200
|
||||
# error Unsupported C++ standard
|
||||
#elif (__cplusplus > 201100) || defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define UAVCAN_CPP_VERSION UAVCAN_CPP11
|
||||
#else
|
||||
# define UAVCAN_CPP_VERSION UAVCAN_CPP03
|
||||
#endif
|
||||
|
||||
/**
|
||||
* UAVCAN can be explicitly told to ignore exceptions, or it can be detected automatically.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user