treewide: avoid use of unsupported C++ specifiers
constexpr and noexcept were introduced as specifiers in C++11. Avoid referencing them when compiling for earlier versions of the language. Signed-off-by: Peter A. Bigot <pab@pabigot.com>
This commit is contained in:
parent
e6b3a33318
commit
6ade720851
2 changed files with 14 additions and 5 deletions
|
@ -50,7 +50,10 @@
|
|||
|
||||
#if defined(__cplusplus)
|
||||
template < class T, size_t N >
|
||||
constexpr size_t ARRAY_SIZE(T(&)[N]) { return N; }
|
||||
#if __cplusplus >= 201103L
|
||||
constexpr
|
||||
#endif /* >= C++11 */
|
||||
size_t ARRAY_SIZE(T(&)[N]) { return N; }
|
||||
|
||||
#else
|
||||
/* Evaluates to number of elements in an array; compile error if not
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue