mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-14 18:13:33 +08:00
Style fix, UAVCAN_CPP_VERSION made optional
This commit is contained in:
@@ -19,12 +19,14 @@
|
||||
#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
|
||||
#ifndef UAVCAN_CPP_VERSION
|
||||
# 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
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -213,7 +213,7 @@ const T& max(const T& a, const T& b)
|
||||
/**
|
||||
* Replacement for std::lexicographical_compare(..)
|
||||
*/
|
||||
template<class InputIt1, class InputIt2>
|
||||
template<typename InputIt1, typename InputIt2>
|
||||
UAVCAN_EXPORT
|
||||
bool lexicographical_compare(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2)
|
||||
{
|
||||
@@ -236,7 +236,7 @@ bool lexicographical_compare(InputIt1 first1, InputIt1 last1, InputIt2 first2, I
|
||||
/**
|
||||
* Replacement for std::equal(..)
|
||||
*/
|
||||
template<class InputIt1, class InputIt2>
|
||||
template<typename InputIt1, typename InputIt2>
|
||||
UAVCAN_EXPORT
|
||||
bool equal(InputIt1 first1, InputIt1 last1, InputIt2 first2)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user