Skip to content

Commit

Permalink
fix clang never using constexpr (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
BlurryLight authored and rparolin committed Dec 10, 2019
1 parent 4b6dda1 commit 970c853
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions include/EASTL/internal/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,20 @@
// http://en.wikipedia.org/wiki/C%2B%2B14#Relaxed_constexpr_restrictions
//
#if !defined(EA_CPP14_CONSTEXPR)

#if defined(EA_COMPILER_MSVC_2015)
#define EA_CPP14_CONSTEXPR // not supported
#define EA_NO_CPP14_CONSTEXPR
#elif defined(__GNUC__) && (EA_COMPILER_VERSION < 9000) // Before GCC 9.0
#define EA_CPP14_CONSTEXPR // not supported
#define EA_NO_CPP14_CONSTEXPR
#define EA_CPP14_CONSTEXPR // not supported
#define EA_NO_CPP14_CONSTEXPR
#elif defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION < 9000) // Before GCC 9.0
#define EA_CPP14_CONSTEXPR // not supported
#define EA_NO_CPP14_CONSTEXPR
#elif defined(EA_COMPILER_CLANG) && (EA_COMPILER_VERSION < 500) // Before clang5
#define EA_CPP14_CONSTEXPR // not supported
#define EA_NO_CPP14_CONSTEXPR
#elif defined(EA_COMPILER_CPP14_ENABLED)
#define EA_CPP14_CONSTEXPR constexpr
#else
#define EA_CPP14_CONSTEXPR // not supported
#define EA_NO_CPP14_CONSTEXPR
#define EA_CPP14_CONSTEXPR // not supported
#define EA_NO_CPP14_CONSTEXPR
#endif
#endif

Expand Down

0 comments on commit 970c853

Please sign in to comment.