From Jason Turner

[time.syn]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpiklrir90/{from.md → to.md} +41 -27
tmp/tmpiklrir90/{from.md → to.md} RENAMED
@@ -1,38 +1,39 @@
1
  ## Header `<chrono>` synopsis <a id="time.syn">[[time.syn]]</a>
2
 
3
  ``` cpp
4
  #include <compare> // see [compare.syn]
5
 
6
- namespace std {
7
- namespace chrono {
8
  // [time.duration], class template duration
9
  template<class Rep, class Period = ratio<1>> class duration;
10
 
11
  // [time.point], class template time_point
12
  template<class Clock, class Duration = typename Clock::duration> class time_point;
13
  }
14
 
 
15
  // [time.traits.specializations], common_type specializations
16
  template<class Rep1, class Period1, class Rep2, class Period2>
17
  struct common_type<chrono::duration<Rep1, Period1>,
18
  chrono::duration<Rep2, Period2>>;
19
 
20
  template<class Clock, class Duration1, class Duration2>
21
  struct common_type<chrono::time_point<Clock, Duration1>,
22
  chrono::time_point<Clock, Duration2>>;
 
23
 
24
- namespace chrono {
25
  // [time.traits], customization traits
26
  template<class Rep> struct treat_as_floating_point;
27
  template<class Rep>
28
- inline constexpr bool treat_as_floating_point_v = treat_as_floating_point<Rep>::value;
29
 
30
  template<class Rep> struct duration_values;
31
 
32
  template<class T> struct is_clock;
33
- template<class T> inline constexpr bool is_clock_v = is_clock<T>::value;
34
 
35
  // [time.duration.nonmember], duration arithmetic
36
  template<class Rep1, class Period1, class Rep2, class Period2>
37
  constexpr common_type_t<duration<Rep1, Period1>, duration<Rep2, Period2>>
38
  operator+(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
@@ -532,11 +533,11 @@ namespace std {
532
  constexpr year_month_weekday
533
  operator-(const year_month_weekday& ymwd, const years& dy) noexcept;
534
 
535
  template<class charT, class traits>
536
  basic_ostream<charT, traits>&
537
- operator<<(basic_ostream<charT, traits>& os, const year_month_weekday& ymwdi);
538
 
539
  // [time.cal.ymwdlast], class year_month_weekday_last
540
  class year_month_weekday_last;
541
 
542
  constexpr bool operator==(const year_month_weekday_last& x,
@@ -708,31 +709,31 @@ namespace std {
708
  const zoned_time<Duration, TimeZonePtr>& t);
709
 
710
  // [time.zone.leap], leap second support
711
  class leap_second;
712
 
713
- bool operator==(const leap_second& x, const leap_second& y);
714
- strong_ordering operator<=>(const leap_second& x, const leap_second& y);
715
 
716
  template<class Duration>
717
- bool operator==(const leap_second& x, const sys_time<Duration>& y);
718
  template<class Duration>
719
- bool operator< (const leap_second& x, const sys_time<Duration>& y);
720
  template<class Duration>
721
- bool operator< (const sys_time<Duration>& x, const leap_second& y);
722
  template<class Duration>
723
- bool operator> (const leap_second& x, const sys_time<Duration>& y);
724
  template<class Duration>
725
- bool operator> (const sys_time<Duration>& x, const leap_second& y);
726
  template<class Duration>
727
- bool operator<=(const leap_second& x, const sys_time<Duration>& y);
728
  template<class Duration>
729
- bool operator<=(const sys_time<Duration>& x, const leap_second& y);
730
  template<class Duration>
731
- bool operator>=(const leap_second& x, const sys_time<Duration>& y);
732
  template<class Duration>
733
- bool operator>=(const sys_time<Duration>& x, const leap_second& y);
734
  template<class Duration>
735
  requires three_way_comparable_with<sys_seconds, sys_time<Duration>>
736
  constexpr auto operator<=>(const leap_second& x, const sys_time<Duration>& y);
737
 
738
  // [time.zone.link], class time_zone_link
@@ -747,10 +748,11 @@ namespace std {
747
  local-time-format-t<Duration>
748
  local_time_format(local_time<Duration> time, const string* abbrev = nullptr,
749
  const seconds* offset_sec = nullptr);
750
  }
751
 
 
752
  template<class Rep, class Period, class charT>
753
  struct formatter<chrono::duration<Rep, Period>, charT>;
754
  template<class Duration, class charT>
755
  struct formatter<chrono::sys_time<Duration>, charT>;
756
  template<class Duration, class charT>
@@ -784,30 +786,45 @@ namespace std {
784
  struct formatter<chrono::hh_mm_ss<duration<Rep, Period>>, charT>;
785
  template<class charT> struct formatter<chrono::sys_info, charT>;
786
  template<class charT> struct formatter<chrono::local_info, charT>;
787
  template<class Duration, class TimeZonePtr, class charT>
788
  struct formatter<chrono::zoned_time<Duration, TimeZonePtr>, charT>;
 
789
 
790
- namespace chrono {
791
  // [time.parse], parsing
 
 
 
792
  template<class charT, class traits, class Alloc, class Parsable>
793
  unspecified
794
- parse(const basic_string<charT, traits, Alloc>& format, Parsable& tp);
795
 
796
  template<class charT, class traits, class Alloc, class Parsable>
797
  unspecified
798
- parse(const basic_string<charT, traits, Alloc>& format, Parsable& tp,
 
 
 
 
799
  basic_string<charT, traits, Alloc>& abbrev);
800
 
 
 
 
801
  template<class charT, class traits, class Alloc, class Parsable>
802
  unspecified
803
- parse(const basic_string<charT, traits, Alloc>& format, Parsable& tp,
804
  minutes& offset);
805
 
806
  template<class charT, class traits, class Alloc, class Parsable>
807
  unspecified
808
- parse(const basic_string<charT, traits, Alloc>& format, Parsable& tp,
 
 
 
 
809
  basic_string<charT, traits, Alloc>& abbrev, minutes& offset);
810
 
811
  // calendrical constants
812
  inline constexpr last_spec last{};
813
 
@@ -831,12 +848,11 @@ namespace std {
831
  inline constexpr month October{10};
832
  inline constexpr month November{11};
833
  inline constexpr month December{12};
834
  }
835
 
836
- inline namespace literals {
837
- inline namespace chrono_literals {
838
  // [time.duration.literals], suffixes for duration literals
839
  constexpr chrono::hours operator""h(unsigned long long);
840
  constexpr chrono::duration<unspecified, ratio<3600, 1>> operator""h(long double);
841
 
842
  constexpr chrono::minutes operator""min(unsigned long long);
@@ -858,13 +874,11 @@ namespace std {
858
  constexpr chrono::day operator""d(unsigned long long d) noexcept;
859
 
860
  // [time.cal.year.nonmembers], non-member functions
861
  constexpr chrono::year operator""y(unsigned long long y) noexcept;
862
  }
863
- }
864
 
865
- namespace chrono {
866
  using namespace literals::chrono_literals;
867
  }
868
- }
869
  ```
870
 
 
1
  ## Header `<chrono>` synopsis <a id="time.syn">[[time.syn]]</a>
2
 
3
  ``` cpp
4
  #include <compare> // see [compare.syn]
5
 
6
+ namespace std::chrono {
 
7
  // [time.duration], class template duration
8
  template<class Rep, class Period = ratio<1>> class duration;
9
 
10
  // [time.point], class template time_point
11
  template<class Clock, class Duration = typename Clock::duration> class time_point;
12
  }
13
 
14
+ namespace std {
15
  // [time.traits.specializations], common_type specializations
16
  template<class Rep1, class Period1, class Rep2, class Period2>
17
  struct common_type<chrono::duration<Rep1, Period1>,
18
  chrono::duration<Rep2, Period2>>;
19
 
20
  template<class Clock, class Duration1, class Duration2>
21
  struct common_type<chrono::time_point<Clock, Duration1>,
22
  chrono::time_point<Clock, Duration2>>;
23
+ }
24
 
25
+ namespace std::chrono {
26
  // [time.traits], customization traits
27
  template<class Rep> struct treat_as_floating_point;
28
  template<class Rep>
29
+ constexpr bool treat_as_floating_point_v = treat_as_floating_point<Rep>::value;
30
 
31
  template<class Rep> struct duration_values;
32
 
33
  template<class T> struct is_clock;
34
+ template<class T> constexpr bool is_clock_v = is_clock<T>::value;
35
 
36
  // [time.duration.nonmember], duration arithmetic
37
  template<class Rep1, class Period1, class Rep2, class Period2>
38
  constexpr common_type_t<duration<Rep1, Period1>, duration<Rep2, Period2>>
39
  operator+(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
 
533
  constexpr year_month_weekday
534
  operator-(const year_month_weekday& ymwd, const years& dy) noexcept;
535
 
536
  template<class charT, class traits>
537
  basic_ostream<charT, traits>&
538
+ operator<<(basic_ostream<charT, traits>& os, const year_month_weekday& ymwd);
539
 
540
  // [time.cal.ymwdlast], class year_month_weekday_last
541
  class year_month_weekday_last;
542
 
543
  constexpr bool operator==(const year_month_weekday_last& x,
 
709
  const zoned_time<Duration, TimeZonePtr>& t);
710
 
711
  // [time.zone.leap], leap second support
712
  class leap_second;
713
 
714
+ constexpr bool operator==(const leap_second& x, const leap_second& y);
715
+ constexpr strong_ordering operator<=>(const leap_second& x, const leap_second& y);
716
 
717
  template<class Duration>
718
+ constexpr bool operator==(const leap_second& x, const sys_time<Duration>& y);
719
  template<class Duration>
720
+ constexpr bool operator< (const leap_second& x, const sys_time<Duration>& y);
721
  template<class Duration>
722
+ constexpr bool operator< (const sys_time<Duration>& x, const leap_second& y);
723
  template<class Duration>
724
+ constexpr bool operator> (const leap_second& x, const sys_time<Duration>& y);
725
  template<class Duration>
726
+ constexpr bool operator> (const sys_time<Duration>& x, const leap_second& y);
727
  template<class Duration>
728
+ constexpr bool operator<=(const leap_second& x, const sys_time<Duration>& y);
729
  template<class Duration>
730
+ constexpr bool operator<=(const sys_time<Duration>& x, const leap_second& y);
731
  template<class Duration>
732
+ constexpr bool operator>=(const leap_second& x, const sys_time<Duration>& y);
733
  template<class Duration>
734
+ constexpr bool operator>=(const sys_time<Duration>& x, const leap_second& y);
735
  template<class Duration>
736
  requires three_way_comparable_with<sys_seconds, sys_time<Duration>>
737
  constexpr auto operator<=>(const leap_second& x, const sys_time<Duration>& y);
738
 
739
  // [time.zone.link], class time_zone_link
 
748
  local-time-format-t<Duration>
749
  local_time_format(local_time<Duration> time, const string* abbrev = nullptr,
750
  const seconds* offset_sec = nullptr);
751
  }
752
 
753
+ namespace std {
754
  template<class Rep, class Period, class charT>
755
  struct formatter<chrono::duration<Rep, Period>, charT>;
756
  template<class Duration, class charT>
757
  struct formatter<chrono::sys_time<Duration>, charT>;
758
  template<class Duration, class charT>
 
786
  struct formatter<chrono::hh_mm_ss<duration<Rep, Period>>, charT>;
787
  template<class charT> struct formatter<chrono::sys_info, charT>;
788
  template<class charT> struct formatter<chrono::local_info, charT>;
789
  template<class Duration, class TimeZonePtr, class charT>
790
  struct formatter<chrono::zoned_time<Duration, TimeZonePtr>, charT>;
791
+ }
792
 
793
+ namespace std::chrono {
794
  // [time.parse], parsing
795
+ template<class charT, class Parsable>
796
+ unspecified
797
+ parse(const charT* fmt, Parsable& tp);
798
  template<class charT, class traits, class Alloc, class Parsable>
799
  unspecified
800
+ parse(const basic_string<charT, traits, Alloc>& fmt, Parsable& tp);
801
 
802
  template<class charT, class traits, class Alloc, class Parsable>
803
  unspecified
804
+ parse(const charT* fmt, Parsable& tp,
805
+ basic_string<charT, traits, Alloc>& abbrev);
806
+ template<class charT, class traits, class Alloc, class Parsable>
807
+ unspecified
808
+ parse(const basic_string<charT, traits, Alloc>& fmt, Parsable& tp,
809
  basic_string<charT, traits, Alloc>& abbrev);
810
 
811
+ template<class charT, class Parsable>
812
+ unspecified
813
+ parse(const charT* fmt, Parsable& tp, minutes& offset);
814
  template<class charT, class traits, class Alloc, class Parsable>
815
  unspecified
816
+ parse(const basic_string<charT, traits, Alloc>& fmt, Parsable& tp,
817
  minutes& offset);
818
 
819
  template<class charT, class traits, class Alloc, class Parsable>
820
  unspecified
821
+ parse(const charT* fmt, Parsable& tp,
822
+ basic_string<charT, traits, Alloc>& abbrev, minutes& offset);
823
+ template<class charT, class traits, class Alloc, class Parsable>
824
+ unspecified
825
+ parse(const basic_string<charT, traits, Alloc>& fmt, Parsable& tp,
826
  basic_string<charT, traits, Alloc>& abbrev, minutes& offset);
827
 
828
  // calendrical constants
829
  inline constexpr last_spec last{};
830
 
 
848
  inline constexpr month October{10};
849
  inline constexpr month November{11};
850
  inline constexpr month December{12};
851
  }
852
 
853
+ namespace std::inline literals::inline chrono_literals {
 
854
  // [time.duration.literals], suffixes for duration literals
855
  constexpr chrono::hours operator""h(unsigned long long);
856
  constexpr chrono::duration<unspecified, ratio<3600, 1>> operator""h(long double);
857
 
858
  constexpr chrono::minutes operator""min(unsigned long long);
 
874
  constexpr chrono::day operator""d(unsigned long long d) noexcept;
875
 
876
  // [time.cal.year.nonmembers], non-member functions
877
  constexpr chrono::year operator""y(unsigned long long y) noexcept;
878
  }
 
879
 
880
+ namespace std::chrono {
881
  using namespace literals::chrono_literals;
882
  }
 
883
  ```
884