am 5ef3bcc7: am 5d8a5ade: Merge "Add a pre-C++11 constexpr compatibility macro."

* commit '5ef3bcc768d7387d78a4e2c89dfcc415e88c1c4d':
  Add a pre-C++11 constexpr compatibility macro.
This commit is contained in:
Dan Albert 2014-11-20 20:26:48 +00:00 committed by Android Git Automerger
commit 2280b5ecbc

View file

@ -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