11
11
#include < algorithm>
12
12
#include < cassert>
13
13
#include < fstream>
14
- #include < functional> // reference_wrapper
15
14
#include < memory>
16
15
#include < sstream>
17
16
#include < stdexcept>
@@ -70,13 +69,13 @@ struct order_by_major_section {
70
69
auto operator ()(lwg::issue const & x, lwg::issue const & y) const -> bool {
71
70
assert (!x.tags .empty ());
72
71
assert (!y.tags .empty ());
73
- lwg::section_num const & xn = section_db. get () [x.tags [0 ]];
74
- lwg::section_num const & yn = section_db. get () [y.tags [0 ]];
72
+ lwg::section_num const & xn = section_db[x.tags [0 ]];
73
+ lwg::section_num const & yn = section_db[y.tags [0 ]];
75
74
return std::tie (xn.prefix , xn.num [0 ]) < std::tie (yn.prefix , yn.num [0 ]);
76
75
}
77
76
78
77
private:
79
- std::reference_wrapper< lwg::section_map> section_db;
78
+ lwg::section_map& section_db;
80
79
};
81
80
82
81
struct order_by_section {
@@ -91,11 +90,11 @@ struct order_by_section {
91
90
// This sorts by the section number (e.g. 23.5.1) then by the section stable tag.
92
91
// This is not redundant, because for e.g. Arrays TS the entire paper has section num 99,
93
92
// so including the tag orders [arrays.ts::dynarray] before [arrays.ts::dynarray.cons].
94
- return std::tie (section_db. get () [x.tags .front ()], x.tags .front ()) < std::tie (section_db. get () [y.tags .front ()], y.tags .front ());
93
+ return std::tie (section_db[x.tags .front ()], x.tags .front ()) < std::tie (section_db[y.tags .front ()], y.tags .front ());
95
94
}
96
95
97
96
private:
98
- std::reference_wrapper< lwg::section_map> section_db;
97
+ lwg::section_map& section_db;
99
98
};
100
99
101
100
struct order_by_status {
@@ -121,13 +120,13 @@ struct order_by_priority {
121
120
assert (!x.tags .empty ());
122
121
assert (!y.tags .empty ());
123
122
auto tie = [this ](auto & i) {
124
- return std::tie (i.priority , section_db. get () [i.tags .front ()], i.num );
123
+ return std::tie (i.priority , section_db[i.tags .front ()], i.num );
125
124
};
126
125
return tie (x) < tie (y);
127
126
}
128
127
129
128
private:
130
- std::reference_wrapper< lwg::section_map> section_db;
129
+ lwg::section_map& section_db;
131
130
};
132
131
133
132
// Replace spaces to make a string usable as an 'id' attribute,
0 commit comments