diff options
Diffstat (limited to 'libcxx/include')
-rw-r--r-- | libcxx/include/functional | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/libcxx/include/functional b/libcxx/include/functional index 9e4d5db4162..a13772f31ae 100644 --- a/libcxx/include/functional +++ b/libcxx/include/functional @@ -1980,16 +1980,29 @@ namespace placeholders template <int _Np> struct __ph {}; -_LIBCPP_FUNC_VIS extern __ph<1> _1; -_LIBCPP_FUNC_VIS extern __ph<2> _2; -_LIBCPP_FUNC_VIS extern __ph<3> _3; -_LIBCPP_FUNC_VIS extern __ph<4> _4; -_LIBCPP_FUNC_VIS extern __ph<5> _5; -_LIBCPP_FUNC_VIS extern __ph<6> _6; -_LIBCPP_FUNC_VIS extern __ph<7> _7; -_LIBCPP_FUNC_VIS extern __ph<8> _8; -_LIBCPP_FUNC_VIS extern __ph<9> _9; -_LIBCPP_FUNC_VIS extern __ph<10> _10; +#if defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_BIND) +_LIBCPP_FUNC_VIS extern const __ph<1> _1; +_LIBCPP_FUNC_VIS extern const __ph<2> _2; +_LIBCPP_FUNC_VIS extern const __ph<3> _3; +_LIBCPP_FUNC_VIS extern const __ph<4> _4; +_LIBCPP_FUNC_VIS extern const __ph<5> _5; +_LIBCPP_FUNC_VIS extern const __ph<6> _6; +_LIBCPP_FUNC_VIS extern const __ph<7> _7; +_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 +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_BIND) } // placeholders |