@@ -13,33 +13,22 @@ struct section_tag
13
13
{
14
14
std::string prefix; // example: fund.ts.v2
15
15
std::string name; // example: meta.logical
16
+ auto operator <=>(const section_tag&) const = default ;
16
17
};
17
18
18
19
struct section_num {
19
20
std::string prefix; // example: fund.ts.v2
20
21
std::vector<int > num; // sequence of numbers corresponding to section number
21
22
// in relevant doc, e.g,, 17.5.2.1.4.2
23
+ auto operator <=>(const section_num&) const = default ;
22
24
};
23
25
24
26
using section_map = std::map<section_tag, section_num>;
25
27
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 ;
29
28
auto operator << (std::ostream & os,
30
29
section_tag const & tag) -> std::ostream &; // with square brackets
31
30
std::string as_string (section_tag const & x); // without square brackets
32
31
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
-
43
32
auto operator >> (std::istream & is, section_num & sn) -> std::istream &;
44
33
auto operator << (std::ostream & os, section_num const & sn) -> std::ostream &;
45
34
0 commit comments