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,17 @@ _LIBCPP_FUNC_VIS extern const __ph<8> _8; _LIBCPP_FUNC_VIS extern const __ph<9> _9; _LIBCPP_FUNC_VIS extern const __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{}; +#else // extension: we make these inline before C++17 too +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{}; #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 @@ -26,8 +26,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_arg_t { explicit allocator_arg_t() = default; }; #ifndef _LIBCPP_CXX03_LANG - -/* inline */ constexpr allocator_arg_t allocator_arg = allocator_arg_t(); +inline constexpr allocator_arg_t allocator_arg = allocator_arg_t(); // extension: inline before C++17 // allocator construction 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,10 @@ 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 !defined(_LIBCPP_CXX03_LANG) // extension: we make those inline before C++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(); # 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,8 @@ 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(); +#ifndef _LIBCPP_CXX03_LANG +inline constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); // extension: inline before C++17 #endif _LIBCPP_END_NAMESPACE_STD