@@ -13,33 +13,22 @@ struct section_tag
1313{
1414 std::string prefix; // example: fund.ts.v2
1515 std::string name; // example: meta.logical
16+ auto operator <=>(const section_tag&) const = default ;
1617};
1718
1819struct section_num {
1920 std::string prefix; // example: fund.ts.v2
2021 std::vector<int > num; // sequence of numbers corresponding to section number
2122 // in relevant doc, e.g,, 17.5.2.1.4.2
23+ auto operator <=>(const section_num&) const = default ;
2224};
2325
2426using section_map = std::map<section_tag, section_num>;
2527
26- auto operator < (section_tag const & x, section_tag const & y) noexcept -> bool ;
27- auto operator == (section_tag const & x, section_tag const & y) noexcept -> bool ;
28- auto operator != (section_tag const & x, section_tag const & y) noexcept -> bool ;
2928auto operator << (std::ostream & os,
3029 section_tag const & tag) -> std::ostream &; // with square brackets
3130std::string as_string (section_tag const & x); // without square brackets
3231
33- auto operator < (section_num const & x, section_num const & y) noexcept -> bool ;
34- // section 'x' sorts before section 'y' if its 'prefix' field lexicographically
35- // precedes that of 'y', and its 'nun' field lexicographically precedes that
36- // of 'y' if the prefix fields are equivalent.
37-
38- auto operator == (section_num const & x, section_num const & y) noexcept -> bool ;
39- auto operator != (section_num const & x, section_num const & y) noexcept -> bool ;
40- // Two 'section_num' objects compare equal if their 'prefix' and 'num' both
41- // compare equal.
42-
4332auto operator >> (std::istream & is, section_num & sn) -> std::istream &;
4433auto operator << (std::ostream & os, section_num const & sn) -> std::ostream &;
4534
0 commit comments