|
16885 | 16885 | \item If \tcode{sizeof...(T)} is one, let \tcode{T0} denote the sole type
|
16886 | 16886 | constituting the pack \tcode{T}.
|
16887 | 16887 | 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}. |
16889 | 16890 |
|
16890 | 16891 | \item If \tcode{sizeof...(T)} is two,
|
16891 | 16892 | let the first and second types constituting \tcode{T} be denoted
|
|
16907 | 16908 | In either case, the member \grammarterm{typedef-name} \tcode{type} shall denote
|
16908 | 16909 | the same type, if any, as \tcode{C}.
|
16909 | 16910 | 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} |
16914 | 16911 |
|
16915 | 16912 | \item If \tcode{sizeof...(T)} is greater than two,
|
16916 | 16913 | let \tcode{T1}, \tcode{T2}, and \tcode{R}, respectively,
|
|
16925 | 16922 | Note B: Notwithstanding the provisions of \ref{meta.type.synop}, and
|
16926 | 16923 | pursuant to \ref{namespace.std},
|
16927 | 16924 | 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 |
16929 | 16926 | \tcode{is_same_v<T1, decay_t<T1>>} and
|
16930 | 16927 | \tcode{is_same_v<T2, decay_t<T2>>} are each \tcode{true}.
|
16931 | 16928 | \begin{note}
|
|
17738 | 17735 | class duration {
|
17739 | 17736 | public:
|
17740 | 17737 | using rep = Rep;
|
17741 |
| - using period = Period; |
| 17738 | + using period = typename Period::type; |
17742 | 17739 | private:
|
17743 | 17740 | rep rep_; // \expos
|
17744 | 17741 | public:
|
|
17756 | 17753 | constexpr rep count() const;
|
17757 | 17754 |
|
17758 | 17755 | // \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; |
17761 | 17758 | constexpr duration& operator++();
|
17762 | 17759 | constexpr duration operator++(int);
|
17763 | 17760 | constexpr duration& operator--();
|
@@ -17883,22 +17880,22 @@
|
17883 | 17880 |
|
17884 | 17881 | \indexlibrarymember{operator+}{duration}%
|
17885 | 17882 | \begin{itemdecl}
|
17886 |
| -constexpr duration operator+() const; |
| 17883 | +constexpr common_type_t<duration> operator+() const; |
17887 | 17884 | \end{itemdecl}
|
17888 | 17885 |
|
17889 | 17886 | \begin{itemdescr}
|
17890 | 17887 | \pnum
|
17891 |
| -\returns \tcode{*this}. |
| 17888 | +\returns \tcode{common_type_t<duration>(*this)}. |
17892 | 17889 | \end{itemdescr}
|
17893 | 17890 |
|
17894 | 17891 | \indexlibrarymember{operator-}{duration}%
|
17895 | 17892 | \begin{itemdecl}
|
17896 |
| -constexpr duration operator-() const; |
| 17893 | +constexpr common_type_t<duration> operator-() const; |
17897 | 17894 | \end{itemdecl}
|
17898 | 17895 |
|
17899 | 17896 | \begin{itemdescr}
|
17900 | 17897 | \pnum
|
17901 |
| -\returns \tcode{duration(-rep_)}. |
| 17898 | +\returns \tcode{common_type_t<duration>(-rep_)}. |
17902 | 17899 | \end{itemdescr}
|
17903 | 17900 |
|
17904 | 17901 | \indexlibrarymember{operator++}{duration}%
|
|
0 commit comments