diff options
author | Louis Dionne <ldionne@apple.com> | 2019-09-24 20:18:54 +0000 |
---|---|---|
committer | Louis Dionne <ldionne@apple.com> | 2019-09-24 20:18:54 +0000 |
commit | 95411dd426e6ea5b13c8f1bb7c4ba7190ecd6c1a (patch) | |
tree | c855a112fdf1c8beb265b722df01b8f8d95e113f /libcxx/include/new | |
parent | 19712415a57509f722c0552550cbc308c25bde7b (diff) | |
download | bcm5719-llvm-95411dd426e6ea5b13c8f1bb7c4ba7190ecd6c1a.tar.gz bcm5719-llvm-95411dd426e6ea5b13c8f1bb7c4ba7190ecd6c1a.zip |
[libc++] Implement LWG 2510
Summary:
LWG2510 makes tag types like allocator_arg_t explicitly default
constructible instead of implicitly default constructible. It also
makes the constructors for std::pair and std::tuple conditionally
explicit based on the explicit-ness of the default constructibility
for the pair/tuple's elements.
Reviewers: mclow.lists, EricWF
Subscribers: christof, jkorous, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D65161
llvm-svn: 372777
Diffstat (limited to 'libcxx/include/new')
-rw-r--r-- | libcxx/include/new | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/new b/libcxx/include/new index 85e4c4b3fcf..40d351e9b77 100644 --- a/libcxx/include/new +++ b/libcxx/include/new @@ -39,7 +39,7 @@ struct destroying_delete_t { // C++20 }; 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 @@ namespace std // purposefully not using versioning namespace { #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 |