|
747 | 747 |
|
748 | 748 | template<class charT, class traits, class Duration>
|
749 | 749 | basic_ostream<charT, traits>&
|
750 |
| - operator<<(basic_ostream<charT, traits>& os, |
751 |
| - const hh_mm_ss<Duration>& t); |
| 750 | + operator<<(basic_ostream<charT, traits>& os, const hh_mm_ss<Duration>& t); |
752 | 751 |
|
753 | 752 | // \ref{time.12}, 12/24 hour functions
|
754 | 753 | constexpr bool is_am(const hours& h) noexcept;
|
|
7797 | 7796 |
|
7798 | 7797 | \begin{codeblock}
|
7799 | 7798 | namespace std::chrono {
|
7800 |
| - template <class Duration> |
7801 |
| - class hh_mm_ss |
7802 |
| - { |
7803 |
| - bool is_neg; // \expos |
7804 |
| - chrono::hours h; // \expos |
7805 |
| - chrono::minutes m; // \expos |
7806 |
| - chrono::seconds s; // \expos |
7807 |
| - precision ss; // \expos |
7808 |
| - |
| 7799 | + template <class Duration> class hh_mm_ss { |
7809 | 7800 | public:
|
7810 | 7801 | static unsigned constexpr fractional_width = @\seebelow@;
|
7811 | 7802 | using precision = @\seebelow@;
|
|
7821 | 7812 |
|
7822 | 7813 | constexpr explicit operator precision() const noexcept;
|
7823 | 7814 | constexpr precision to_duration() const noexcept;
|
7824 |
| - }; |
7825 | 7815 |
|
7826 |
| - template <class charT, class traits, class Duration> |
7827 |
| - basic_ostream<charT, traits>& |
7828 |
| - operator<<(basic_ostream<charT, traits>& os, hh_mm_ss<Duration> const& hms); |
| 7816 | + private: |
| 7817 | + bool is_neg; // \expos |
| 7818 | + chrono::hours h; // \expos |
| 7819 | + chrono::minutes m; // \expos |
| 7820 | + chrono::seconds s; // \expos |
| 7821 | + precision ss; // \expos |
| 7822 | + }; |
7829 | 7823 | }
|
7830 | 7824 | \end{codeblock}
|
7831 | 7825 |
|
|
7942 | 7936 | with \tcode{duration_cast<precision>(abs(d) - hours() - minutes() - seconds())}.
|
7943 | 7937 | \end{itemize}
|
7944 | 7938 | \begin{note}
|
7945 |
| -When \tcode{precision} is \tcode{seconds} with integral representation, |
7946 |
| -\tcode{subseconds()} always returns \tcode{0s}. |
| 7939 | +When \tcode{precision::rep} is integral and |
| 7940 | +\tcode{precision::period} is \tcode{ratio<1>}, |
| 7941 | +\tcode{subseconds()} always returns a value equal to \tcode{0s}. |
7947 | 7942 | \end{note}
|
7948 | 7943 |
|
7949 | 7944 | \pnum
|
|
0 commit comments