[libcxx-commits] [libcxx] r366735 - [NFC][libc++] Add missing EXPLICIT to pair and tuple synopsis
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jul 22 13:45:23 PDT 2019
Author: ldionne
Date: Mon Jul 22 13:45:23 2019
New Revision: 366735
URL: http://llvm.org/viewvc/llvm-project?rev=366735&view=rev
Log:
[NFC][libc++] Add missing EXPLICIT to pair and tuple synopsis
The constructors for std::pair and std::tuple have been made conditionally
explicit, however the synopsis in the headers do not reflect that.
Modified:
libcxx/trunk/include/tuple
libcxx/trunk/include/utility
Modified: libcxx/trunk/include/tuple
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/tuple?rev=366735&r1=366734&r2=366735&view=diff
==============================================================================
--- libcxx/trunk/include/tuple (original)
+++ libcxx/trunk/include/tuple Mon Jul 22 13:45:23 2019
@@ -20,39 +20,39 @@ template <class... T>
class tuple {
public:
constexpr tuple();
- explicit tuple(const T&...); // constexpr in C++14
+ explicit(see-below) tuple(const T&...); // constexpr in C++14
template <class... U>
- explicit tuple(U&&...); // constexpr in C++14
+ explicit(see-below) tuple(U&&...); // constexpr in C++14
tuple(const tuple&) = default;
tuple(tuple&&) = default;
template <class... U>
- tuple(const tuple<U...>&); // constexpr in C++14
+ explicit(see-below) tuple(const tuple<U...>&); // constexpr in C++14
template <class... U>
- tuple(tuple<U...>&&); // constexpr in C++14
+ explicit(see-below) tuple(tuple<U...>&&); // constexpr in C++14
template <class U1, class U2>
- tuple(const pair<U1, U2>&); // iff sizeof...(T) == 2 // constexpr in C++14
+ explicit(see-below) tuple(const pair<U1, U2>&); // iff sizeof...(T) == 2 // constexpr in C++14
template <class U1, class U2>
- tuple(pair<U1, U2>&&); // iff sizeof...(T) == 2 // constexpr in C++14
+ explicit(see-below) tuple(pair<U1, U2>&&); // iff sizeof...(T) == 2 // constexpr in C++14
// allocator-extended constructors
template <class Alloc>
tuple(allocator_arg_t, const Alloc& a);
template <class Alloc>
- tuple(allocator_arg_t, const Alloc& a, const T&...);
+ explicit(see-below) tuple(allocator_arg_t, const Alloc& a, const T&...);
template <class Alloc, class... U>
- tuple(allocator_arg_t, const Alloc& a, U&&...);
+ explicit(see-below) tuple(allocator_arg_t, const Alloc& a, U&&...);
template <class Alloc>
tuple(allocator_arg_t, const Alloc& a, const tuple&);
template <class Alloc>
tuple(allocator_arg_t, const Alloc& a, tuple&&);
template <class Alloc, class... U>
- tuple(allocator_arg_t, const Alloc& a, const tuple<U...>&);
+ explicit(see-below) tuple(allocator_arg_t, const Alloc& a, const tuple<U...>&);
template <class Alloc, class... U>
- tuple(allocator_arg_t, const Alloc& a, tuple<U...>&&);
+ explicit(see-below) tuple(allocator_arg_t, const Alloc& a, tuple<U...>&&);
template <class Alloc, class U1, class U2>
- tuple(allocator_arg_t, const Alloc& a, const pair<U1, U2>&);
+ explicit(see-below) tuple(allocator_arg_t, const Alloc& a, const pair<U1, U2>&);
template <class Alloc, class U1, class U2>
- tuple(allocator_arg_t, const Alloc& a, pair<U1, U2>&&);
+ explicit(see-below) tuple(allocator_arg_t, const Alloc& a, pair<U1, U2>&&);
tuple& operator=(const tuple&);
tuple&
Modified: libcxx/trunk/include/utility
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/utility?rev=366735&r1=366734&r2=366735&view=diff
==============================================================================
--- libcxx/trunk/include/utility (original)
+++ libcxx/trunk/include/utility Mon Jul 22 13:45:23 2019
@@ -70,10 +70,10 @@ struct pair
pair(const pair&) = default;
pair(pair&&) = default;
constexpr pair();
- pair(const T1& x, const T2& y); // constexpr in C++14
- template <class U, class V> pair(U&& x, V&& y); // constexpr in C++14
- template <class U, class V> pair(const pair<U, V>& p); // constexpr in C++14
- template <class U, class V> pair(pair<U, V>&& p); // constexpr in C++14
+ explicit(see-below) pair(const T1& x, const T2& y); // constexpr in C++14
+ template <class U, class V> explicit(see-below) pair(U&& x, V&& y); // constexpr in C++14
+ template <class U, class V> explicit(see-below) pair(const pair<U, V>& p); // constexpr in C++14
+ template <class U, class V> explicit(see-below) pair(pair<U, V>&& p); // constexpr in C++14
template <class... Args1, class... Args2>
pair(piecewise_construct_t, tuple<Args1...> first_args,
tuple<Args2...> second_args);
More information about the libcxx-commits
mailing list