Skip to content

Commit a71c29e

Browse files
committed
Revert "Fix string_transparent_hash_ut (#158)"
This reverts commit eebe4b0.
1 parent 640a783 commit a71c29e

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

util/generic/string_transparent_hash_ut.cpp

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,15 @@
33
#include "strbuf.h"
44

55
#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>
127

138
#include <util/str_stl.h>
149

1510
Y_UNIT_TEST_SUITE(StringHashFunctorTests) {
1611
Y_UNIT_TEST(TestTransparencyWithUnorderedSet) {
1712
// Using Abseil hash set because `std::unordered_set` is transparent only from C++20 (while
1813
// 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"};
2815
// If either `THash` or `TEqualTo` is not transparent compilation will fail.
2916
UNIT_ASSERT_UNEQUAL(s.find(TStringBuf("foo")), s.end());
3017
UNIT_ASSERT_EQUAL(s.find(TStringBuf("bar")), s.end());

0 commit comments

Comments
 (0)