rapidhash: Fix compilation as C++14 with GCC 5.5

Enable `inline constexpr` markup only for specific compilers
to avoid `error: call to non-constexpr function ...`.
This commit is contained in:
Brad King
2026-07-21 19:46:42 -04:00
parent 6bf80fd430
commit b6837dc4c3

View File

@@ -57,7 +57,7 @@
# ifndef RAPIDHASH_INLINE
# define RAPIDHASH_INLINE RAPIDHASH_ALWAYS_INLINE
# endif
# if __cplusplus >= 201402L && !defined(_MSC_VER)
# if __cplusplus >= 201402L && ((defined(__GNUC__) && __GNUC__ > 5) || defined(__INTEL_COMPILER) || defined(__clang__))
# define RAPIDHASH_INLINE_CONSTEXPR RAPIDHASH_ALWAYS_INLINE constexpr
# else
# define RAPIDHASH_INLINE_CONSTEXPR RAPIDHASH_ALWAYS_INLINE