1#ifndef RBIMPL_ATTR_CONSTEXPR_H
2#define RBIMPL_ATTR_CONSTEXPR_H
27#if ! defined(__cplusplus)
29# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 0
30# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 0
32#elif defined(__cpp_constexpr)
34# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 (__cpp_constexpr >= 200704L)
35# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 (__cpp_constexpr >= 201304L)
37#elif RBIMPL_COMPILER_SINCE(MSVC, 19, 0, 0)
38# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 RBIMPL_COMPILER_SINCE(MSVC, 19, 00, 00)
39# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 RBIMPL_COMPILER_SINCE(MSVC, 19, 11, 00)
41#elif RBIMPL_COMPILER_SINCE(SunPro, 5, 13, 0)
42# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 (__cplusplus >= 201103L)
43# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 (__cplusplus >= 201402L)
45#elif RBIMPL_COMPILER_SINCE(GCC, 4, 9, 0)
46# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 (__cplusplus >= 201103L)
47# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 (__cplusplus >= 201402L)
49#elif RBIMPL_HAS_FEATURE(cxx_relaxed_constexpr)
50# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 1
51# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 1
53#elif RBIMPL_HAS_FEATURE(cxx_constexpr)
54# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 1
55# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 0
59# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 0
60# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 0
65#if RBIMPL_HAS_ATTR_CONSTEXPR_CXX14
66# define RBIMPL_ATTR_CONSTEXPR(_) constexpr
68#elif RBIMPL_HAS_ATTR_CONSTEXPR_CXX11
69# define RBIMPL_ATTR_CONSTEXPR(_) RBIMPL_ATTR_CONSTEXPR_ ## _
70# define RBIMPL_ATTR_CONSTEXPR_CXX11 constexpr
71# define RBIMPL_ATTR_CONSTEXPR_CXX14
74# define RBIMPL_ATTR_CONSTEXPR(_)
79# define RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(_) RBIMPL_ATTR_CONSTEXPR(_)
81# define RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(_)
Defines RBIMPL_COMPILER_IS.
Defines RBIMPL_HAS_FEATURE.