diff --git a/libcxx/include/__functional_base b/libcxx/include/__functional_base --- a/libcxx/include/__functional_base +++ b/libcxx/include/__functional_base @@ -558,7 +558,7 @@ // allocator_arg_t -struct _LIBCPP_TEMPLATE_VIS allocator_arg_t { }; +struct _LIBCPP_TEMPLATE_VIS allocator_arg_t { explicit allocator_arg_t() = default; }; #if defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_LIBRARY) extern _LIBCPP_EXPORTED_FROM_ABI const allocator_arg_t allocator_arg; diff --git a/libcxx/include/__mutex_base b/libcxx/include/__mutex_base --- a/libcxx/include/__mutex_base +++ b/libcxx/include/__mutex_base @@ -65,9 +65,9 @@ static_assert(is_nothrow_default_constructible::value, "the default constructor for std::mutex must be nothrow"); -struct _LIBCPP_TYPE_VIS defer_lock_t {}; -struct _LIBCPP_TYPE_VIS try_to_lock_t {}; -struct _LIBCPP_TYPE_VIS adopt_lock_t {}; +struct _LIBCPP_TYPE_VIS defer_lock_t { explicit defer_lock_t() = default; }; +struct _LIBCPP_TYPE_VIS try_to_lock_t { explicit try_to_lock_t() = default; }; +struct _LIBCPP_TYPE_VIS adopt_lock_t { explicit adopt_lock_t() = default; }; #if defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_LIBRARY) diff --git a/libcxx/include/mutex b/libcxx/include/mutex --- a/libcxx/include/mutex +++ b/libcxx/include/mutex @@ -86,9 +86,9 @@ void unlock(); }; -struct defer_lock_t {}; -struct try_to_lock_t {}; -struct adopt_lock_t {}; +struct defer_lock_t { explicit defer_lock_t() = default; }; +struct try_to_lock_t { explicit try_to_lock_t() = default; }; +struct adopt_lock_t { explicit adopt_lock_t() = default; }; inline constexpr defer_lock_t defer_lock{}; inline constexpr try_to_lock_t try_to_lock{}; diff --git a/libcxx/include/new b/libcxx/include/new --- a/libcxx/include/new +++ b/libcxx/include/new @@ -39,7 +39,7 @@ }; inline constexpr destroying_delete_t destroying_delete{}; // C++20 -struct nothrow_t {}; +struct nothrow_t { explicit nothrow_t() = default; }; extern const nothrow_t nothrow; typedef void (*new_handler)(); new_handler set_new_handler(new_handler new_p) noexcept; @@ -126,7 +126,7 @@ { #if !defined(_LIBCPP_ABI_VCRUNTIME) -struct _LIBCPP_TYPE_VIS nothrow_t {}; +struct _LIBCPP_TYPE_VIS nothrow_t { explicit nothrow_t() = default; }; extern _LIBCPP_FUNC_VIS const nothrow_t nothrow; class _LIBCPP_EXCEPTION_ABI bad_alloc diff --git a/libcxx/include/tuple b/libcxx/include/tuple --- a/libcxx/include/tuple +++ b/libcxx/include/tuple @@ -19,7 +19,7 @@ template class tuple { public: - constexpr tuple(); + explicit(see-below) constexpr tuple(); explicit tuple(const T&...); // constexpr in C++14 template explicit tuple(U&&...); // constexpr in C++14 @@ -489,8 +489,14 @@ struct _CheckArgsConstructor { template - static constexpr bool __enable_default() { - return __all::value...>::value; + static constexpr bool __enable_implicit_default() { + return __all<__is_implicitly_default_constructible<_Args>::value...>::value; + } + + template + static constexpr bool __enable_explicit_default() { + return __all::value...>::value + && !__enable_implicit_default<_Args...>(); } template @@ -631,10 +637,17 @@ public: template ::template __enable_default<_Tp...>() + _CheckArgsConstructor<_Dummy>::template __enable_implicit_default<_Tp...>() >::type> - _LIBCPP_INLINE_VISIBILITY - _LIBCPP_CONSTEXPR tuple() + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR + tuple() + _NOEXCEPT_(__all::value...>::value) {} + + template ::template __enable_explicit_default<_Tp...>() + >::type> + explicit _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR + tuple() _NOEXCEPT_(__all::value...>::value) {} tuple(tuple const&) = default; diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -2836,6 +2836,19 @@ = is_default_constructible<_Tp>::value; #endif +template +void __test_implicit_default_constructible(_Tp); + +template +struct __is_implicitly_default_constructible + : std::false_type +{ }; + +template +struct __is_implicitly_default_constructible<_Tp, decltype(__test_implicit_default_constructible<_Tp const&>({}))> + : is_default_constructible<_Tp> +{ }; + // is_copy_constructible template diff --git a/libcxx/include/utility b/libcxx/include/utility --- a/libcxx/include/utility +++ b/libcxx/include/utility @@ -69,7 +69,7 @@ pair(const pair&) = default; pair(pair&&) = default; - constexpr pair(); + explicit(see-below) constexpr pair(); pair(const T1& x, const T2& y); // constexpr in C++14 template pair(U&& x, V&& y); // constexpr in C++14 template pair(const pair& p); // constexpr in C++14 @@ -99,7 +99,7 @@ void swap(pair& x, pair& y) noexcept(noexcept(x.swap(y))); -struct piecewise_construct_t { }; +struct piecewise_construct_t { explicit piecewise_construct_t() = default; }; inline constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); template struct tuple_size; @@ -294,7 +294,7 @@ template void as_const(const _Tp&&) = delete; #endif -struct _LIBCPP_TEMPLATE_VIS piecewise_construct_t { }; +struct _LIBCPP_TEMPLATE_VIS piecewise_construct_t { explicit piecewise_construct_t() = default; }; #if defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_LIBRARY) extern _LIBCPP_EXPORTED_FROM_ABI const piecewise_construct_t piecewise_construct;// = piecewise_construct_t(); #else @@ -353,9 +353,16 @@ struct _CheckArgs { template - static constexpr bool __enable_default() { + static constexpr bool __enable_explicit_default() { return is_default_constructible<_U1>::value - && is_default_constructible<_U2>::value; + && is_default_constructible<_U2>::value + && !__enable_implicit_default<_U1, _U2>(); + } + + template + static constexpr bool __enable_implicit_default() { + return __is_implicitly_default_constructible<_U1>::value + && __is_implicitly_default_constructible<_U2>::value; } template @@ -406,7 +413,15 @@ >::type; template::template __enable_default<_T1, _T2>() + _CheckArgsDep<_Dummy>::template __enable_explicit_default<_T1, _T2>() + > = false> + explicit _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR + pair() _NOEXCEPT_(is_nothrow_default_constructible::value && + is_nothrow_default_constructible::value) + : first(), second() {} + + template::template __enable_implicit_default<_T1, _T2>() > = false> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR pair() _NOEXCEPT_(is_nothrow_default_constructible::value && diff --git a/libcxx/src/mutex.cpp b/libcxx/src/mutex.cpp --- a/libcxx/src/mutex.cpp +++ b/libcxx/src/mutex.cpp @@ -21,9 +21,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD #ifndef _LIBCPP_HAS_NO_THREADS -const defer_lock_t defer_lock = {}; -const try_to_lock_t try_to_lock = {}; -const adopt_lock_t adopt_lock = {}; +const defer_lock_t defer_lock{}; +const try_to_lock_t try_to_lock{}; +const adopt_lock_t adopt_lock{}; // ~mutex is defined elsewhere diff --git a/libcxx/src/utility.cpp b/libcxx/src/utility.cpp --- a/libcxx/src/utility.cpp +++ b/libcxx/src/utility.cpp @@ -10,6 +10,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD -const piecewise_construct_t piecewise_construct = {}; +const piecewise_construct_t piecewise_construct{}; _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/test/libcxx/type_traits/is_implicitly_default_constructible.pass.cpp b/libcxx/test/libcxx/type_traits/is_implicitly_default_constructible.pass.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/libcxx/type_traits/is_implicitly_default_constructible.pass.cpp @@ -0,0 +1,56 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03 + +// + +// __is_implicitly_default_constructible + +#include + + +struct ExplicitlyDefaultConstructible1 { + explicit ExplicitlyDefaultConstructible1() = default; +}; + +struct ExplicitlyDefaultConstructible2 { + explicit ExplicitlyDefaultConstructible2() { } +}; + +struct ImplicitlyDefaultConstructible1 { + ImplicitlyDefaultConstructible1() { } +}; + +struct ImplicitlyDefaultConstructible2 { + ImplicitlyDefaultConstructible2() = default; +}; + +struct NonDefaultConstructible1 { + NonDefaultConstructible1() = delete; +}; + +struct NonDefaultConstructible2 { + explicit NonDefaultConstructible2() = delete; +}; + +struct NonDefaultConstructible3 { + NonDefaultConstructible3(NonDefaultConstructible3&&) { } +}; + +static_assert(!std::__is_implicitly_default_constructible::value, ""); +static_assert(!std::__is_implicitly_default_constructible::value, ""); +static_assert(std::__is_implicitly_default_constructible::value, ""); +static_assert(std::__is_implicitly_default_constructible::value, ""); +static_assert(!std::__is_implicitly_default_constructible::value, ""); +static_assert(!std::__is_implicitly_default_constructible::value, ""); +static_assert(!std::__is_implicitly_default_constructible::value, ""); + +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/language.support/support.dynamic/nothrow_t.fail.cpp b/libcxx/test/std/language.support/support.dynamic/nothrow_t.fail.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/language.support/support.dynamic/nothrow_t.fail.cpp @@ -0,0 +1,26 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// struct nothrow_t { +// explicit nothrow_t() = default; +// }; +// extern const nothrow_t nothrow; + +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// This test checks for LWG 2510. + +#include + + +std::nothrow_t f() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} + +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/language.support/support.dynamic/nothrow_t.pass.cpp b/libcxx/test/std/language.support/support.dynamic/nothrow_t.pass.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/language.support/support.dynamic/nothrow_t.pass.cpp @@ -0,0 +1,25 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// struct nothrow_t { +// explicit nothrow_t() = default; +// }; +// extern const nothrow_t nothrow; + +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +#include + + +int main(int, char**) { + std::nothrow_t x = std::nothrow; + (void)x; + + return 0; +} diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/types.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/types.fail.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/types.fail.cpp @@ -0,0 +1,31 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: libcpp-has-no-threads + +// + +// struct defer_lock_t { explicit defer_lock_t() = default; }; +// struct try_to_lock_t { explicit try_to_lock_t() = default; }; +// struct adopt_lock_t { explicit adopt_lock_t() = default; }; + +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// This test checks for LWG 2510. + +#include + + +std::defer_lock_t f1() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} +std::try_to_lock_t f2() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} +std::adopt_lock_t f3() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} + +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/types.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/types.pass.cpp --- a/libcxx/test/std/thread/thread.mutex/thread.lock/types.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/types.pass.cpp @@ -10,16 +10,15 @@ // -// struct defer_lock_t {}; -// struct try_to_lock_t {}; -// struct adopt_lock_t {}; +// struct defer_lock_t { explicit defer_lock_t() = default; }; +// struct try_to_lock_t { explicit try_to_lock_t() = default; }; +// struct adopt_lock_t { explicit adopt_lock_t() = default; }; // // constexpr defer_lock_t defer_lock{}; // constexpr try_to_lock_t try_to_lock{}; // constexpr adopt_lock_t adopt_lock{}; #include -#include #include "test_macros.h" @@ -33,5 +32,5 @@ T2 t2 = std::try_to_lock; ((void)t2); T3 t3 = std::adopt_lock; ((void)t3); - return 0; + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.pass.cpp b/libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.fail.cpp copy from libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.pass.cpp copy to libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.fail.cpp --- a/libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.fail.cpp @@ -8,18 +8,16 @@ // -// struct allocator_arg_t { }; +// struct allocator_arg_t { explicit allocator_arg_t() = default; }; // const allocator_arg_t allocator_arg = allocator_arg_t(); -#include +// This test checks for LWG 2510. -#include "test_macros.h" +#include -void test(std::allocator_arg_t) {} -int main(int, char**) -{ - test(std::allocator_arg); +std::allocator_arg_t f() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} - return 0; +int main(int, char**) { + return 0; } diff --git a/libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.pass.cpp b/libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.pass.cpp --- a/libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.pass.cpp @@ -8,7 +8,7 @@ // -// struct allocator_arg_t { }; +// struct allocator_arg_t { explicit allocator_arg_t() = default; }; // const allocator_arg_t allocator_arg = allocator_arg_t(); #include @@ -21,5 +21,5 @@ { test(std::allocator_arg); - return 0; + return 0; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.fail.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.fail.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.fail.cpp @@ -0,0 +1,49 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// + +// template class tuple; + +// explicit(see-below) constexpr tuple(); + +// UNSUPPORTED: c++98, c++03 + +#include + + +struct Implicit { + Implicit() = default; +}; + +struct Explicit { + explicit Explicit() = default; +}; + +std::tuple<> test1() { return {}; } + +std::tuple test2() { return {}; } +std::tuple test3() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} + +std::tuple test4() { return {}; } +std::tuple test5() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} +std::tuple test6() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} +std::tuple test7() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} + +std::tuple test8() { return {}; } +std::tuple test9() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} +std::tuple test10() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} +std::tuple test11() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} +std::tuple test12() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} +std::tuple test13() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} +std::tuple test14() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} +std::tuple test15() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} + +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp @@ -10,7 +10,7 @@ // template class tuple; -// constexpr tuple(); +// explicit(see-below) constexpr tuple(); // UNSUPPORTED: c++98, c++03 diff --git a/libcxx/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct.pass.cpp --- a/libcxx/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct.pass.cpp @@ -12,7 +12,7 @@ // template struct pair -// struct piecewise_construct_t { }; +// struct piecewise_construct_t { explicit piecewise_construct_t() = default; }; // constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); #include diff --git a/libcxx/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct_t.fail.cpp b/libcxx/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct_t.fail.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct_t.fail.cpp @@ -0,0 +1,25 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03 + +// + +// struct piecewise_construct_t { explicit piecewise_construct_t() = default; }; +// constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); + +// This test checks for LWG 2510. + +#include + + +std::piecewise_construct_t f() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} + +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct_t.pass.cpp copy from libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.pass.cpp copy to libcxx/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct_t.pass.cpp --- a/libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct_t.pass.cpp @@ -6,20 +6,19 @@ // //===----------------------------------------------------------------------===// -// +// UNSUPPORTED: c++98, c++03 -// struct allocator_arg_t { }; -// const allocator_arg_t allocator_arg = allocator_arg_t(); +// -#include +// struct piecewise_construct_t { explicit piecewise_construct_t() = default; }; +// constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); -#include "test_macros.h" +#include -void test(std::allocator_arg_t) {} -int main(int, char**) -{ - test(std::allocator_arg); +int main(int, char**) { + std::piecewise_construct_t x = std::piecewise_construct; + (void)x; - return 0; + return 0; } diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/default.explicit.fail.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/default.explicit.fail.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/default.explicit.fail.cpp @@ -0,0 +1,38 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// + +// template struct pair + +// explicit(see-below) constexpr pair(); + +// UNSUPPORTED: c++98, c++03 + +// This test checks the conditional explicitness of std::pair's default +// constructor as introduced by the resolution of LWG 2510. + +#include + + +struct ImplicitlyDefaultConstructible { + ImplicitlyDefaultConstructible() = default; +}; + +struct ExplicitlyDefaultConstructible { + explicit ExplicitlyDefaultConstructible() = default; +}; + +std::pair test1() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} +std::pair test2() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} +std::pair test3() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} +std::pair test4() { return {}; } + +int main(int, char**) { + return 0; +} diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp @@ -10,7 +10,7 @@ // template struct pair -// constexpr pair(); +// explicit(see-below) constexpr pair(); // This test doesn't pass due to a constexpr bug in GCC 4.9 that fails // to initialize any type without a user provided constructor in a constant diff --git a/libcxx/www/cxx1z_status.html b/libcxx/www/cxx1z_status.html --- a/libcxx/www/cxx1z_status.html +++ b/libcxx/www/cxx1z_status.html @@ -372,7 +372,7 @@ 2468Self-move-assignment of library typesIssaquah 2475Allow overwriting of std::basic_string terminator with charT() to allow cleaner interoperation with legacy APIsIssaquahComplete 2503multiline option should be added to syntax_option_typeIssaquah - 2510Tag types should not be DefaultConstructibleIssaquah + 2510Tag types should not be DefaultConstructibleIssaquahComplete 2514Type traits must not be finalIssaquahComplete 2518[fund.ts.v2] Non-member swap for propagate_const should call member swapIssaquahComplete 2519Iterator operator-= has gratuitous undefined behaviourIssaquahComplete