Skip to content
Snippets Groups Projects
Commit 5d8a5ade authored by Dan Albert's avatar Dan Albert Committed by Gerrit Code Review
Browse files

Merge "Add a pre-C++11 constexpr compatibility macro."

parents aa3e17e1 e4c649c9
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,17 @@ static inline ssize_t pread64(int fd, void* buf, size_t nbytes, off64_t offset)
# define ZD_TYPE long
#endif
/*
* Needed for cases where something should be constexpr if possible, but not
* being constexpr is fine if in pre-C++11 code (such as a const static float
* member variable).
*/
#if __cplusplus >= 201103L
#define CONSTEXPR constexpr
#else
#define CONSTEXPR
#endif
/*
* TEMP_FAILURE_RETRY is defined by some, but not all, versions of
* <unistd.h>. (Alas, it is not as standard as we'd hoped!) So, if it's
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment