diff --git a/libcxx/include/__functional/bind.h b/libcxx/include/__functional/bind.h --- a/libcxx/include/__functional/bind.h +++ b/libcxx/include/__functional/bind.h @@ -62,17 +62,28 @@ _LIBCPP_FUNC_VIS extern const __ph<8> _8; _LIBCPP_FUNC_VIS extern const __ph<9> _9; _LIBCPP_FUNC_VIS extern const __ph<10> _10; +#elif _LIBCPP_STD_VER >= 17 +inline constexpr __ph<1> _1{}; +inline constexpr __ph<2> _2{}; +inline constexpr __ph<3> _3{}; +inline constexpr __ph<4> _4{}; +inline constexpr __ph<5> _5{}; +inline constexpr __ph<6> _6{}; +inline constexpr __ph<7> _7{}; +inline constexpr __ph<8> _8{}; +inline constexpr __ph<9> _9{}; +inline constexpr __ph<10> _10{}; #else -/* inline */ constexpr __ph<1> _1{}; -/* inline */ constexpr __ph<2> _2{}; -/* inline */ constexpr __ph<3> _3{}; -/* inline */ constexpr __ph<4> _4{}; -/* inline */ constexpr __ph<5> _5{}; -/* inline */ constexpr __ph<6> _6{}; -/* inline */ constexpr __ph<7> _7{}; -/* inline */ constexpr __ph<8> _8{}; -/* inline */ constexpr __ph<9> _9{}; -/* inline */ constexpr __ph<10> _10{}; +constexpr __ph<1> _1{}; +constexpr __ph<2> _2{}; +constexpr __ph<3> _3{}; +constexpr __ph<4> _4{}; +constexpr __ph<5> _5{}; +constexpr __ph<6> _6{}; +constexpr __ph<7> _7{}; +constexpr __ph<8> _8{}; +constexpr __ph<9> _9{}; +constexpr __ph<10> _10{}; #endif // defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_LIBRARY) } // namespace placeholders diff --git a/libcxx/include/__memory/allocator_arg_t.h b/libcxx/include/__memory/allocator_arg_t.h --- a/libcxx/include/__memory/allocator_arg_t.h +++ b/libcxx/include/__memory/allocator_arg_t.h @@ -25,7 +25,11 @@ struct _LIBCPP_TEMPLATE_VIS allocator_arg_t { explicit allocator_arg_t() = default; }; -#ifndef _LIBCPP_CXX03_LANG +#if _LIBCPP_STD_VER >= 17 +inline constexpr allocator_arg_t allocator_arg = allocator_arg_t(); +#elif !defined(_LIBCPP_CXX03_LANG) +constexpr allocator_arg_t allocator_arg = allocator_arg_t(); +#endif /* inline */ constexpr allocator_arg_t allocator_arg = allocator_arg_t(); diff --git a/libcxx/include/__mutex/tag_types.h b/libcxx/include/__mutex/tag_types.h --- a/libcxx/include/__mutex/tag_types.h +++ b/libcxx/include/__mutex/tag_types.h @@ -31,10 +31,14 @@ explicit adopt_lock_t() = default; }; -# if !defined(_LIBCPP_CXX03_LANG) -/* inline */ constexpr defer_lock_t defer_lock = defer_lock_t(); -/* inline */ constexpr try_to_lock_t try_to_lock = try_to_lock_t(); -/* inline */ constexpr adopt_lock_t adopt_lock = adopt_lock_t(); +# if _LIBCPP_STD_VER >= 17 +inline constexpr defer_lock_t defer_lock = defer_lock_t(); +inline constexpr try_to_lock_t try_to_lock = try_to_lock_t(); +inline constexpr adopt_lock_t adopt_lock = adopt_lock_t(); +# elif !defined(_LIBCPP_CXX03_LANG) +constexpr defer_lock_t defer_lock = defer_lock_t(); +constexpr try_to_lock_t try_to_lock = try_to_lock_t(); +constexpr adopt_lock_t adopt_lock = adopt_lock_t(); # endif _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__utility/piecewise_construct.h b/libcxx/include/__utility/piecewise_construct.h --- a/libcxx/include/__utility/piecewise_construct.h +++ b/libcxx/include/__utility/piecewise_construct.h @@ -19,8 +19,10 @@ struct _LIBCPP_TEMPLATE_VIS piecewise_construct_t { explicit piecewise_construct_t() = default; }; -#if !defined(_LIBCPP_CXX03_LANG) -/* inline */ constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); +#if _LIBCPP_STD_VER >= 17 +inline constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); +#elif !defined(_LIBCPP_CXX03_LANG) +constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); #endif _LIBCPP_END_NAMESPACE_STD