Index: include/__config =================================================================== --- include/__config +++ include/__config @@ -978,9 +978,10 @@ #define _LIBCPP_NODISCARD_AFTER_CXX17 #endif -// FIXME: Remove all usages of this macro once compilers catch up. -#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606L) -# define _LIBCPP_HAS_NO_INLINE_VARIABLES +#if _LIBCPP_STD_VER > 14 && defined(__cpp_inline_variables) && (__cpp_inline_variables >= 201606L) +# define _LIBCPP_INLINE_VAR inline +#else +# define _LIBCPP_INLINE_VAR #endif #ifdef _LIBCPP_HAS_NO_RVALUE_REFERENCES Index: include/utility =================================================================== --- include/utility +++ include/utility @@ -904,10 +904,7 @@ struct _LIBCPP_TYPE_VIS in_place_t { explicit in_place_t() = default; }; -#ifndef _LIBCPP_HAS_NO_INLINE_VARIABLES -inline -#endif -constexpr in_place_t in_place{}; +_LIBCPP_INLINE_VAR constexpr in_place_t in_place{}; template struct _LIBCPP_TEMPLATE_VIS in_place_type_t { @@ -914,10 +911,7 @@ explicit in_place_type_t() = default; }; template -#ifndef _LIBCPP_HAS_NO_INLINE_VARIABLES -inline -#endif -constexpr in_place_type_t<_Tp> in_place_type{}; +_LIBCPP_INLINE_VAR constexpr in_place_type_t<_Tp> in_place_type{}; template struct _LIBCPP_TYPE_VIS in_place_index_t { @@ -924,10 +918,7 @@ explicit in_place_index_t() = default; }; template -#ifndef _LIBCPP_HAS_NO_INLINE_VARIABLES -inline -#endif -constexpr in_place_index_t<_Idx> in_place_index{}; +_LIBCPP_INLINE_VAR constexpr in_place_index_t<_Idx> in_place_index{}; template struct __is_inplace_type_imp : false_type {}; template struct __is_inplace_type_imp> : true_type {};