forked from RobotLocomotion/drake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstring_set.h
21 lines (16 loc) · 805 Bytes
/
string_set.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once
#include <functional>
#include <set>
#include <string>
namespace drake {
/** Like `std::set<std::string>`, but with better defaults than the plain
`std::set<std::string>` spelling. We need `std::less<void>` as the comparison
function so that `std::string_view` and `const char*` can be used as lookup keys
without copying them to a `std::string`. */
using string_set = std::set<std::string, std::less<void>>;
/** Like `std::multiset<std::string>`, but with better defaults than the plain
`std::multiset<std::string>` spelling. We need `std::less<void>` as the
comparison function so that `std::string_view` and `const char*` can be used as
lookup keys without copying them to a `std::string`. */
using string_multiset = std::multiset<std::string, std::less<void>>;
} // namespace drake