summaryrefslogtreecommitdiffstats
path: root/libcxx/include/__mutex_base
diff options
context:
space:
mode:
authorLouis Dionne <ldionne@apple.com>2019-09-26 14:51:10 +0000
committerLouis Dionne <ldionne@apple.com>2019-09-26 14:51:10 +0000
commite16f2cb6789286dbfa4a184cef25b91dfb499206 (patch)
treef67676d1b91559354b68e3e9860e0ee4aae2705f /libcxx/include/__mutex_base
parent1822087facdfaeac69dcd14690866a4d872e3fdb (diff)
downloadbcm5719-llvm-e16f2cb6789286dbfa4a184cef25b91dfb499206.tar.gz
bcm5719-llvm-e16f2cb6789286dbfa4a184cef25b91dfb499206.zip
[libc++] Take 2: 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. This was previously committed as r372777 and reverted in r372832 due to the commit breaking LLVM's build in C++14 mode. This issue has now been addressed. Reviewers: mclow.lists Subscribers: christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D65161 llvm-svn: 372983
Diffstat (limited to 'libcxx/include/__mutex_base')
-rw-r--r--libcxx/include/__mutex_base6
1 files changed, 3 insertions, 3 deletions
diff --git a/libcxx/include/__mutex_base b/libcxx/include/__mutex_base
index a4ac36161cb..ed75c82380a 100644
--- a/libcxx/include/__mutex_base
+++ b/libcxx/include/__mutex_base
@@ -66,9 +66,9 @@ public:
static_assert(is_nothrow_default_constructible<mutex>::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)
OpenPOWER on IntegriCloud