File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change 3
3
#include " strbuf.h"
4
4
5
5
#include < library/cpp/testing/unittest/registar.h>
6
-
7
- #if __cplusplus < 202002L
8
- #include < library/cpp/containers/absl_flat_hash/flat_hash_set.h>
9
- #else
10
- #include < unordered_set>
11
- #endif
6
+ #include < library/cpp/containers/absl_flat_hash/flat_hash_set.h>
12
7
13
8
#include < util/str_stl.h>
14
9
15
10
Y_UNIT_TEST_SUITE (StringHashFunctorTests) {
16
11
Y_UNIT_TEST (TestTransparencyWithUnorderedSet) {
17
12
// Using Abseil hash set because `std::unordered_set` is transparent only from C++20 (while
18
13
// we stuck with C++17 right now).
19
- using TTransparentHashSet =
20
- #if __cplusplus < 202002L
21
- absl::flat_hash_set
22
- #else
23
- std::unordered_set
24
- #endif
25
- <TString, THash<TString>, TEqualTo<TString>>;
26
-
27
- TTransparentHashSet s = {" foo" };
14
+ absl::flat_hash_set<TString, THash<TString>, TEqualTo<TString>> s = {" foo" };
28
15
// If either `THash` or `TEqualTo` is not transparent compilation will fail.
29
16
UNIT_ASSERT_UNEQUAL (s.find (TStringBuf (" foo" )), s.end ());
30
17
UNIT_ASSERT_EQUAL (s.find (TStringBuf (" bar" )), s.end ());
You can’t perform that action at this time.
0 commit comments