@@ -13,33 +13,24 @@ struct section_tag
1313{
1414 std::string prefix; // example: fund.ts.v2
1515 std::string name; // example: meta.logical
16+ bool operator ==(const section_tag&) const = default ;
17+ auto operator <=>(const section_tag&) const = default ;
1618};
1719
1820struct section_num {
1921 std::string prefix; // example: fund.ts.v2
2022 std::vector<int > num; // sequence of numbers corresponding to section number
2123 // in relevant doc, e.g,, 17.5.2.1.4.2
24+ bool operator ==(const section_num&) const = default ;
25+ auto operator <=>(const section_num&) const = default ;
2226};
2327
2428using section_map = std::map<section_tag, section_num>;
2529
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 ;
2930auto operator << (std::ostream & os,
3031 section_tag const & tag) -> std::ostream &; // with square brackets
3132std::string as_string (section_tag const & x); // without square brackets
3233
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-
4334auto operator >> (std::istream & is, section_num & sn) -> std::istream &;
4435auto operator << (std::ostream & os, section_num const & sn) -> std::ostream &;
4536
0 commit comments