Skip to content

Commit 5624657

Browse files
committed
Merge 2017-11 LWG Motion 7
2 parents 3e52404 + 5c908ef commit 5624657

File tree

1 file changed

+46
-26
lines changed

1 file changed

+46
-26
lines changed

source/utilities.tex

+46-26
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,7 @@
17291729
Equivalent to:
17301730
\begin{codeblock}
17311731
return apply_impl(std::forward<F>(f), std::forward<Tuple>(t),
1732-
make_index_sequence<tuple_size_v<decay_t<Tuple>>>{});
1732+
make_index_sequence<tuple_size_v<remove_reference_t<Tuple>>>{});
17331733
\end{codeblock}
17341734
\end{itemdescr}
17351735

@@ -1751,8 +1751,9 @@
17511751
\end{codeblock}
17521752
Equivalent to:
17531753
\begin{codeblock}
1754-
return make_from_tuple_impl<T>(forward<Tuple>(t),
1755-
make_index_sequence<tuple_size_v<decay_t<Tuple>>>{});
1754+
return make_from_tuple_impl<T>(
1755+
forward<Tuple>(t),
1756+
make_index_sequence<tuple_size_v<remove_reference_t<Tuple>>>{});
17561757
\end{codeblock}
17571758
\begin{note} The type of \tcode{T} must be supplied
17581759
as an explicit template parameter,
@@ -2430,8 +2431,8 @@
24302431
this constructor shall be a constexpr constructor.
24312432
This constructor shall not participate in overload resolution unless
24322433
\tcode{is_constructible_v<T, U\&\&>} is \tcode{true},
2433-
\tcode{is_same_v<decay_t<U>, in_place_t>} is \tcode{false}, and
2434-
\tcode{is_same_v<optional<T>, decay_t<U>>} is \tcode{false}.
2434+
\tcode{is_same_v<remove_cvref_t<U>, in_place_t>} is \tcode{false}, and
2435+
\tcode{is_same_v<remove_cvref_t<U>, optional>} is \tcode{false}.
24352436
The constructor is explicit if and only if
24362437
\tcode{is_convertible_v<U\&\&, T>} is \tcode{false}.
24372438
\end{itemdescr}
@@ -2668,7 +2669,7 @@
26682669
\remarks
26692670
If any exception is thrown, the result of the expression \tcode{bool(*this)} remains unchanged. If an exception is thrown during the call to \tcode{T}'s constructor, the state of \tcode{v} is determined by the exception safety guarantee of \tcode{T}'s constructor. If an exception is thrown during the call to \tcode{T}'s assignment, the state of \tcode{*val} and \tcode{v} is determined by the exception safety guarantee of \tcode{T}'s assignment.
26702671
This function shall not participate in overload resolution unless
2671-
\tcode{is_same_v<optional<T>, decay_t<U>>} is \tcode{false},
2672+
\tcode{is_same_v<remove_cvref_t<U>, optional>} is \tcode{false},
26722673
\tcode{conjunction_v<is_scalar<T>, is_same<T, decay_t<U>>>} is \tcode{false},
26732674
\tcode{is_constructible_v<T, U>} is \tcode{true}, and
26742675
\tcode{is_assignable_v<T\&, U>} is \tcode{true}.
@@ -3975,16 +3976,27 @@
39753976

39763977
\pnum
39773978
\remarks
3978-
This function shall not participate in overload resolution
3979-
unless \tcode{sizeof...(Types)} is nonzero,
3980-
unless \tcode{is_same_v<decay_t<T>, variant>} is \tcode{false},
3981-
unless \tcode{decay_t<T>} is neither
3982-
a specialization of \tcode{in_place_type_t}
3983-
nor a specialization of \tcode{in_place_index_t},
3984-
unless \tcode{is_constructible_v<$\tcode{T}_j$, T>} is \tcode{true},
3985-
and unless the expression
3986-
\tcode{\placeholdernc{FUN}(}\brk\tcode{std::forward<T>(t))} (with \tcode{\placeholdernc{FUN}}
3987-
being the above-mentioned set of imaginary functions) is well-formed.
3979+
This function shall not participate in overload resolution unless
3980+
\begin{itemize}
3981+
\item
3982+
\tcode{sizeof...(Types)} is nonzero,
3983+
3984+
\item
3985+
\tcode{is_same_v<remove_cvref_t<T>, variant>} is \tcode{false},
3986+
3987+
\item
3988+
\tcode{remove_cvref_t<T>} is neither a specialization
3989+
of \tcode{in_place_type_t} nor a specialization
3990+
of \tcode{in_place_index_t},
3991+
3992+
\item
3993+
\tcode{is_constructible_v<$\tcode{T}_j$, T>} is \tcode{true}, and
3994+
3995+
\item
3996+
the expression \tcode{\placeholdernc{FUN}(}\brk\tcode{std::forward<T>(t))}
3997+
(with \tcode{\placeholdernc{FUN}} being the above-mentioned set of
3998+
imaginary functions) is well-formed.
3999+
\end{itemize}
39884000

39894001
\pnum
39904002
\begin{note}
@@ -4268,11 +4280,19 @@
42684280
\pnum
42694281
\remarks
42704282
This function shall not participate in overload resolution unless
4271-
\tcode{is_same_v<decay_t<T>, variant>} is \tcode{false}, unless
4272-
\tcode{is_assignable_v<$\tcode{T}_j$\&, T> \&\& is_constructible_v<$\tcode{T}_j$, T>} is \tcode{true},
4273-
and unless the expression \tcode{\placeholdernc{FUN}(std::forward<T>(t))} (with
4274-
\tcode{\placeholdernc{FUN}} being the above-mentioned set of imaginary functions)
4275-
is well-formed.
4283+
\begin{itemize}
4284+
\item
4285+
\tcode{is_same_v<remove_cvref_t<T>, variant>} is \tcode{false},
4286+
4287+
\item
4288+
\tcode{is_assignable_v<$\tcode{T}_j$\&, T> \&\& is_constructible_v<$\tcode{T}_j$, T>}
4289+
is \tcode{true}, and
4290+
4291+
\item
4292+
the expression \tcode{\placeholdernc{FUN}(std::forward<T>(t))}
4293+
(with \tcode{\placeholdernc{FUN}} being the above-mentioned set
4294+
of imaginary functions) is well-formed.
4295+
\end{itemize}
42764296

42774297
\pnum
42784298
\begin{note}
@@ -5502,7 +5522,7 @@
55025522

55035523
\begin{itemdescr}
55045524
\pnum
5505-
Let \tcode{U} be the type \tcode{remove_cv_t<remove_reference_t<T>>}.
5525+
Let \tcode{U} be the type \tcode{remove_cvref_t<T>}.
55065526

55075527
\pnum
55085528
\requires
@@ -12800,23 +12820,23 @@
1280012820
\begin{itemize}
1280112821
\item \tcode{(t$_1$.*f)(t$_2$, $\dotsc$, t$_N$)} when \tcode{f} is a pointer to a
1280212822
member function of a class \tcode{T}
12803-
and \tcode{is_base_of_v<T, decay_t<decltype(t$_1$)>>} is \tcode{true};
12823+
and \tcode{is_base_of_v<T, remove_reference_t<decltype(t$_1$)>>} is \tcode{true};
1280412824

1280512825
\item \tcode{(t$_1$.get().*f)(t$_2$, $\dotsc$, t$_N$)} when \tcode{f} is a pointer to a
1280612826
member function of a class \tcode{T}
12807-
and \tcode{decay_t<decltype(t$_1$)>} is a specialization of \tcode{reference_wrapper};
12827+
and \tcode{remove_cvref_t<decltype(t$_1$)>} is a specialization of \tcode{reference_wrapper};
1280812828

1280912829
\item \tcode{((*t$_1$).*f)(t$_2$, $\dotsc$, t$_N$)} when \tcode{f} is a pointer to a
1281012830
member function of a class \tcode{T}
1281112831
and \tcode{t$_1$} does not satisfy the previous two items;
1281212832

1281312833
\item \tcode{t$_1$.*f} when \tcode{N == 1} and \tcode{f} is a pointer to
1281412834
data member of a class \tcode{T}
12815-
and \tcode{is_base_of_v<T, decay_t<decltype(t$_1$)>>} is \tcode{true};
12835+
and \tcode{is_base_of_v<T, remove_reference_t<decltype(t$_1$)>>} is \tcode{true};
1281612836

1281712837
\item \tcode{t$_1$.get().*f} when \tcode{N == 1} and \tcode{f} is a pointer to
1281812838
data member of a class \tcode{T}
12819-
and \tcode{decay_t<decltype(t$_1$)>} is a specialization of \tcode{reference_wrapper};
12839+
and \tcode{remove_cvref_t<decltype(t$_1$)>} is a specialization of \tcode{reference_wrapper};
1282012840

1282112841
\item \tcode{(*t$_1$).*f} when \tcode{N == 1} and \tcode{f} is a pointer to
1282212842
data member of a class \tcode{T}

0 commit comments

Comments
 (0)