Style fix, UAVCAN_CPP_VERSION made optional

This commit is contained in:
Pavel Kirienko
2014-05-05 20:14:57 +04:00
parent 581ee43231
commit 2b14328787
2 changed files with 10 additions and 8 deletions
+8 -6
View File
@@ -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
/**
+2 -2
View File
@@ -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)
{