Create polyvox_constexpr macros based on the detected features
We now have a two new polyvox_ macros: * polyvox_constexpr which is 'constexpr' is supported and '' otherwise * polyvox_constexpr_const constexpr which is also 'constexpr' is supported but falls back to 'const' otherwise. These macros should be safe to use liberally without worrying about which compiler you're on.
This commit is contained in:
parent
3902e00a0f
commit
c8657943c8
@ -104,4 +104,12 @@ freely, subject to the following restrictions:
|
|||||||
//#define static_assert static_assert //we can use this
|
//#define static_assert static_assert //we can use this
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAS_CXX11_CONSTEXPR)
|
||||||
|
#define polyvox_constexpr_const constexpr //constexpr which falls back to const
|
||||||
|
#define polyvox_constexpr constexpr //constexpr which falls back to nothing
|
||||||
|
#else
|
||||||
|
#define polyvox_constexpr_const const
|
||||||
|
#define polyvox_constexpr
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user