Skip to content

Commit 85f1b47

Browse files
committed
Merge 2017-03 LWG Motion 22
2 parents 34e8a3f + ddab348 commit 85f1b47

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

source/utilities.tex

+10-13
Original file line numberDiff line numberDiff line change
@@ -16885,7 +16885,8 @@
1688516885
\item If \tcode{sizeof...(T)} is one, let \tcode{T0} denote the sole type
1688616886
constituting the pack \tcode{T}.
1688716887
The member \grammarterm{typedef-name} \tcode{type} shall denote the same
16888-
type as \tcode{decay_t<T0>}.
16888+
type, if any, as \tcode{common_type_t<T0, T0>};
16889+
otherwise there shall be no member \tcode{type}.
1688916890

1689016891
\item If \tcode{sizeof...(T)} is two,
1689116892
let the first and second types constituting \tcode{T} be denoted
@@ -16907,10 +16908,6 @@
1690716908
In either case, the member \grammarterm{typedef-name} \tcode{type} shall denote
1690816909
the same type, if any, as \tcode{C}.
1690916910
Otherwise, there shall be no member \tcode{type}.
16910-
\begin{note}
16911-
When \tcode{is_same_v<T1, T2>} is \tcode{true},
16912-
the effect is equivalent to that of \tcode{common_type<T1>}.
16913-
\end{note}
1691416911

1691516912
\item If \tcode{sizeof...(T)} is greater than two,
1691616913
let \tcode{T1}, \tcode{T2}, and \tcode{R}, respectively,
@@ -16925,7 +16922,7 @@
1692516922
Note B: Notwithstanding the provisions of \ref{meta.type.synop}, and
1692616923
pursuant to \ref{namespace.std},
1692716924
a program may specialize \tcode{common_type<T1, T2>}
16928-
for distinct types \tcode{T1} and \tcode{T2} such that
16925+
for types \tcode{T1} and \tcode{T2} such that
1692916926
\tcode{is_same_v<T1, decay_t<T1>>} and
1693016927
\tcode{is_same_v<T2, decay_t<T2>>} are each \tcode{true}.
1693116928
\begin{note}
@@ -17738,7 +17735,7 @@
1773817735
class duration {
1773917736
public:
1774017737
using rep = Rep;
17741-
using period = Period;
17738+
using period = typename Period::type;
1774217739
private:
1774317740
rep rep_; // \expos
1774417741
public:
@@ -17756,8 +17753,8 @@
1775617753
constexpr rep count() const;
1775717754

1775817755
// \ref{time.duration.arithmetic}, arithmetic
17759-
constexpr duration operator+() const;
17760-
constexpr duration operator-() const;
17756+
constexpr common_type_t<duration> operator+() const;
17757+
constexpr common_type_t<duration> operator-() const;
1776117758
constexpr duration& operator++();
1776217759
constexpr duration operator++(int);
1776317760
constexpr duration& operator--();
@@ -17883,22 +17880,22 @@
1788317880

1788417881
\indexlibrarymember{operator+}{duration}%
1788517882
\begin{itemdecl}
17886-
constexpr duration operator+() const;
17883+
constexpr common_type_t<duration> operator+() const;
1788717884
\end{itemdecl}
1788817885

1788917886
\begin{itemdescr}
1789017887
\pnum
17891-
\returns \tcode{*this}.
17888+
\returns \tcode{common_type_t<duration>(*this)}.
1789217889
\end{itemdescr}
1789317890

1789417891
\indexlibrarymember{operator-}{duration}%
1789517892
\begin{itemdecl}
17896-
constexpr duration operator-() const;
17893+
constexpr common_type_t<duration> operator-() const;
1789717894
\end{itemdecl}
1789817895

1789917896
\begin{itemdescr}
1790017897
\pnum
17901-
\returns \tcode{duration(-rep_)}.
17898+
\returns \tcode{common_type_t<duration>(-rep_)}.
1790217899
\end{itemdescr}
1790317900

1790417901
\indexlibrarymember{operator++}{duration}%

0 commit comments

Comments
 (0)