5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_COMPILER_SUPPORT_CPP14_INLINE_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_COMPILER_SUPPORT_CPP14_INLINE_HPP_
25template <
typename ObjectT>
26struct cpp14_inline_static_const {
28 static constexpr ObjectT value{};
31template <
typename ObjectT>
32constexpr ObjectT cpp14_inline_static_const<ObjectT>::value;
63#if ARENE_IS_ON(ARENE_STD_INLINE_VARIABLES)
65#define ARENE_CPP14_INLINE_VARIABLE(type, name) \
66 ARENE_MAYBE_UNUSED inline constexpr type name {}
69#define ARENE_CPP14_INLINE_VARIABLE(type, name) \
72 ARENE_MAYBE_UNUSED constexpr auto& name = ::arene::base::detail::cpp14_inline_static_const<type>::value; \
74 ARENE_REQUIRE_SEMICOLON
86#if ARENE_IS_ON(ARENE_STD_INLINE_VARIABLES)
88#define ARENE_CPP14_INLINE_VARIABLE_INIT(name, ...) ARENE_MAYBE_UNUSED inline constexpr auto name = __VA_ARGS__
91#define ARENE_CPP14_INLINE_VARIABLE_INIT_DETAIL_NS(name) name##_cpp14_inline_detail
93#define ARENE_CPP14_INLINE_VARIABLE_INIT_DETAIL_VAR(name) name##_v
95#define ARENE_CPP14_INLINE_VARIABLE_INIT(name, ...) \
96 namespace ARENE_CPP14_INLINE_VARIABLE_INIT_DETAIL_NS(name) { \
97 template <decltype(nullptr) = nullptr> \
98 extern constexpr auto ARENE_CPP14_INLINE_VARIABLE_INIT_DETAIL_VAR(name) = __VA_ARGS__; \
100 ARENE_MAYBE_UNUSED static constexpr auto const& name = \
101 ARENE_CPP14_INLINE_VARIABLE_INIT_DETAIL_NS(name)::ARENE_CPP14_INLINE_VARIABLE_INIT_DETAIL_VAR(name)<>; \
102 ARENE_REQUIRE_SEMICOLON
Definition accumulate.hpp:37
Definition accumulate.hpp:36