From dfb5a666a555b15988441e3cb10649290c048457 Mon Sep 17 00:00:00 2001 From: SvRgK11010 Date: Sat, 6 Apr 2024 17:25:52 +0300 Subject: [PATCH 1/5] Resolved conflicts --- .../ydb_persqueue_core/ut/read_session_ut.cpp | 4 +- .../ut/ut_utils/test_server.h | 2 +- .../ut/ut_utils/ut_utils.cpp | 2 +- library/cpp/cache/cache.h | 23 +- library/cpp/charset/codepage.cpp | 4 +- library/cpp/charset/wide_ut.cpp | 4 +- library/cpp/cppparser/parser.cpp | 4 +- library/cpp/dbg_output/dump.h | 4 +- library/cpp/dbg_output/dumpers.h | 5 +- .../cpp/getopt/small/completion_generator.cpp | 2 +- library/cpp/getopt/small/last_getopt_opt.h | 19 +- library/cpp/getopt/small/last_getopt_parser.h | 2 +- library/cpp/http/io/compression_ut.cpp | 4 +- library/cpp/http/io/stream.cpp | 4 +- library/cpp/http/server/http_ut.cpp | 6 +- library/cpp/http/server/options.cpp | 4 +- .../encode/prometheus/prometheus_encoder.cpp | 4 +- library/cpp/monlib/service/auth.cpp | 1 - library/cpp/string_utils/url/url.cpp | 1 - library/cpp/testing/common/ut/network_ut.cpp | 3 +- library/cpp/testing/unittest/utmain.cpp | 9 +- library/cpp/yt/string/format-inl.h | 13 +- library/cpp/yt/string/unittests/format_ut.cpp | 4 +- util/CMakeLists.txt | 8 - util/generic/fwd.h | 6 - util/generic/hash_set.cpp | 1 - util/generic/hash_set.h | 490 ------------------ util/generic/hash_set.pxd | 43 -- util/generic/hash_set_ut.pyx | 53 -- util/generic/hash_ut.cpp | 1 - util/generic/is_in_ut.cpp | 5 +- util/generic/ptr_ut.cpp | 3 +- util/memory/smallobj_ut.cpp | 3 +- util/network/endpoint_ut.cpp | 4 +- util/network/socket.cpp | 4 +- util/thread/pool_ut.cpp | 6 +- util/ysaveload.h | 7 +- util/ysaveload_ut.cpp | 3 +- 38 files changed, 85 insertions(+), 680 deletions(-) delete mode 100644 util/generic/hash_set.cpp delete mode 100644 util/generic/hash_set.h delete mode 100644 util/generic/hash_set.pxd delete mode 100644 util/generic/hash_set_ut.pyx diff --git a/client/ydb_persqueue_core/ut/read_session_ut.cpp b/client/ydb_persqueue_core/ut/read_session_ut.cpp index 0d681aa6b51..be5337c01ef 100644 --- a/client/ydb_persqueue_core/ut/read_session_ut.cpp +++ b/client/ydb_persqueue_core/ut/read_session_ut.cpp @@ -1320,8 +1320,8 @@ Y_UNIT_TEST_SUITE(ReadSessionImplTest) { Cerr << "Compressed message data size: " << compressedMessageData.size() << Endl; ui64 offset = 1; ui64 seqNo = 42; - THashSet committedCookies; - THashSet committedOffsets; + std::unordered_set committedCookies; + std::unordered_set committedOffsets; EXPECT_CALL(*setup.MockProcessor, OnCommitRequest(_)) .WillRepeatedly(Invoke([&committedCookies, &committedOffsets](const Ydb::PersQueue::V1::MigrationStreamingReadClientMessage::Commit& req) { for (const auto& commit : req.cookies()) { diff --git a/client/ydb_persqueue_core/ut/ut_utils/test_server.h b/client/ydb_persqueue_core/ut/ut_utils/test_server.h index f42cfc6945c..9683f778094 100644 --- a/client/ydb_persqueue_core/ut/ut_utils/test_server.h +++ b/client/ydb_persqueue_core/ut/ut_utils/test_server.h @@ -136,7 +136,7 @@ class TTestServer { if (killPq) { - THashSet restartedTablets; + std::unordered_set restartedTablets; for (const auto& p : persQueueGroup.GetPartitions()) if (restartedTablets.insert(p.GetTabletId()).second) { diff --git a/client/ydb_persqueue_core/ut/ut_utils/ut_utils.cpp b/client/ydb_persqueue_core/ut/ut_utils/ut_utils.cpp index 21b2be71948..493870bd10a 100644 --- a/client/ydb_persqueue_core/ut/ut_utils/ut_utils.cpp +++ b/client/ydb_persqueue_core/ut/ut_utils/ut_utils.cpp @@ -3,7 +3,7 @@ namespace NYdb::NPersQueue::NTests { void WaitMessagesAcked(std::shared_ptr writer, ui64 startSeqNo, ui64 endSeqNo) { - THashSet ackedSeqNo; + std::unordered_set ackedSeqNo; while (ackedSeqNo.size() < endSeqNo - startSeqNo + 1) { auto event = *writer->GetEvent(true); if (std::holds_alternative(event)) { diff --git a/library/cpp/cache/cache.h b/library/cpp/cache/cache.h index dcf77cb826f..e96fad7bf03 100644 --- a/library/cpp/cache/cache.h +++ b/library/cpp/cache/cache.h @@ -3,9 +3,9 @@ #include #include #include -#include #include #include +#include template struct TUniformSizeProvider { @@ -67,6 +67,7 @@ class TLRUList { TValue Value; struct THash { + using is_transparent = void; size_t operator()(const TItem& item) const { return ::THash()(item.Key); } @@ -76,6 +77,7 @@ class TLRUList { }; struct TEqualTo { + using is_transparent = void; bool operator()(const TItem& lhs, const TItem& rhs) const { return lhs.Key == rhs.Key; } @@ -203,6 +205,7 @@ class TLFUList { size_t Counter; struct THash { + using is_transparent = void; size_t operator()(const TItem& item) const { return ::THash()(item.Key); } @@ -212,6 +215,7 @@ class TLFUList { }; struct TEqualTo { + using is_transparent = void; bool operator()(const TItem& lhs, const TItem& rhs) const { return lhs.Key == rhs.Key; } @@ -332,7 +336,9 @@ class TLWList { TValue Value; TWeight Weight; + struct THash { + using is_transparent = void; size_t operator()(const TItem& item) const { return ::THash()(item.Key); } @@ -341,7 +347,8 @@ class TLWList { } }; - struct TEqualTo { + struct TEqualTo { + using is_transparent = void; bool operator()(const TItem& lhs, const TItem& rhs) const { return lhs.Key == rhs.Key; } @@ -446,17 +453,17 @@ class TLWList { private: std::vector Heap; - THashSet Removed; + std::unordered_set Removed; size_t Size; size_t MaxSize; }; -template > +template > class TCache { typedef typename TListType::TItem TItem; typedef typename TItem::THash THash; - typedef THashMultiSet TIndex; + typedef std::unordered_multiset TIndex; typedef typename TIndex::iterator TIndexIterator; typedef typename TIndex::const_iterator TIndexConstIterator; @@ -657,7 +664,7 @@ class TCache { Index.reserve(hint); } - typedef typename TIndex::node_allocator_type TNodeAllocatorType; + typedef typename std::allocator_traits::template rebind_alloc TNodeAllocatorType; TNodeAllocatorType& GetNodeAllocator() { return Index.GetNodeAllocator(); } @@ -691,7 +698,7 @@ struct TNoopDelete { } }; -template , typename TAllocator = std::allocator> +template , typename TAllocator = std::allocator::TItem>> class TLRUCache: public TCache, TDeleter, TAllocator> { using TListType = TLRUList; typedef TCache TBase; @@ -763,4 +770,4 @@ class TLWCache: public TCacheFindByItem(TBase::List.GetLightest()); } -}; +}; \ No newline at end of file diff --git a/library/cpp/charset/codepage.cpp b/library/cpp/charset/codepage.cpp index ba7517a607e..4161b2413d1 100644 --- a/library/cpp/charset/codepage.cpp +++ b/library/cpp/charset/codepage.cpp @@ -9,12 +9,12 @@ #include #include -#include #include #include #include #include +#include #include @@ -202,7 +202,7 @@ ECharset CharsetByNameOrDie(std::string_view name) { } namespace { - class THashSetType: public THashSet { + class THashSetType: public std::unordered_set { public: inline void Add(const std::string& s) { insert(s); diff --git a/library/cpp/charset/wide_ut.cpp b/library/cpp/charset/wide_ut.cpp index 954e9020a82..0098337b5bc 100644 --- a/library/cpp/charset/wide_ut.cpp +++ b/library/cpp/charset/wide_ut.cpp @@ -6,9 +6,9 @@ #include #include -#include #include +#include namespace { //! three UTF8 encoded russian letters (A, B, V) @@ -350,7 +350,7 @@ void TConversionTest::TestRecode() { if (!SingleByteCodepage(enc)) continue; - using THash = THashSet; + using THash = std::unordered_set; THash hash; for (int i = 0; i != 256; ++i) { diff --git a/library/cpp/cppparser/parser.cpp b/library/cpp/cppparser/parser.cpp index b5d0c1205e7..ed17f9a768a 100644 --- a/library/cpp/cppparser/parser.cpp +++ b/library/cpp/cppparser/parser.cpp @@ -1,7 +1,7 @@ #include #include -#include #include +#include #include "parser.h" @@ -558,7 +558,7 @@ void TCppSimpleSax::DoCode(const TText& text) { } class TCppFullSax::TImpl { - typedef THashSet TKeyWords; + typedef std::unordered_set TKeyWords; class TRegExp { public: diff --git a/library/cpp/dbg_output/dump.h b/library/cpp/dbg_output/dump.h index c7efa105ee6..e9e8e994e38 100644 --- a/library/cpp/dbg_output/dump.h +++ b/library/cpp/dbg_output/dump.h @@ -7,8 +7,8 @@ #include #include -#include #include +#include /* * Cout << DbgDump(any) << Endl; @@ -59,7 +59,7 @@ namespace NPrivate { } } - THashSet Visited; + std::unordered_set Visited; }; }; diff --git a/library/cpp/dbg_output/dumpers.h b/library/cpp/dbg_output/dumpers.h index 34028b63e0b..3842eb5d0a1 100644 --- a/library/cpp/dbg_output/dumpers.h +++ b/library/cpp/dbg_output/dumpers.h @@ -8,6 +8,7 @@ #include #include #include +#include //smart pointers template @@ -139,11 +140,11 @@ struct TDumper>: public TAssocDumper { }; template -struct TDumper>: public TAssocDumper { +struct TDumper>: public TAssocDumper { }; template -struct TDumper>: public TAssocDumper { +struct TDumper>: public TAssocDumper { }; //strings diff --git a/library/cpp/getopt/small/completion_generator.cpp b/library/cpp/getopt/small/completion_generator.cpp index 3e418500471..0f63b1f9a9a 100644 --- a/library/cpp/getopt/small/completion_generator.cpp +++ b/library/cpp/getopt/small/completion_generator.cpp @@ -246,7 +246,7 @@ namespace NLastGetopt { void TZshCompletionGenerator::GenerateOptCompletion(TFormattedOutput& out, const TOpts& opts, const TOpt& opt, NComp::TCompleterManager& manager) { auto& line = L; - THashSet disableOptions; + std::unordered_set disableOptions; if (opt.DisableCompletionForOptions_) { disableOptions.insert("-"); } else { diff --git a/library/cpp/getopt/small/last_getopt_opt.h b/library/cpp/getopt/small/last_getopt_opt.h index b82e50d7b26..d8021b904d7 100644 --- a/library/cpp/getopt/small/last_getopt_opt.h +++ b/library/cpp/getopt/small/last_getopt_opt.h @@ -3,10 +3,15 @@ #include "completer.h" #include "last_getopt_handlers.h" -#include +#include #include +#include +//#include #include +#include +#include +#include namespace NLastGetopt { enum EHasArg { @@ -75,7 +80,7 @@ namespace NLastGetopt { TdOptVal OptionalValue_; TdOptVal DefaultValue_; TOptHandlers Handlers_; - THashSet Choices_; + std::unordered_set Choices_; public: /** @@ -703,7 +708,7 @@ namespace NLastGetopt { // Appends FromString(arg) to *target for each argument template - TOpt& InsertTo(THashSet* target) { + TOpt& InsertTo(std::unordered_set* target) { return Handler1T([target](auto&& value) { target->insert(std::forward(value)); }); } @@ -742,11 +747,11 @@ namespace NLastGetopt { template TOpt& Choices(TIterator begin, TIterator end) { - return Choices(THashSet{begin, end}); + return Choices(std::unordered_set{begin, end}); } template - TOpt& Choices(THashSet choices) { + TOpt& Choices(std::unordered_set choices) { Choices_ = std::move(choices); return Handler1T( [this] (const TValue& arg) { @@ -759,7 +764,7 @@ namespace NLastGetopt { TOpt& Choices(std::vector choices) { return Choices( - THashSet{ + std::unordered_set{ std::make_move_iterator(choices.begin()), std::make_move_iterator(choices.end()) }); @@ -767,7 +772,7 @@ namespace NLastGetopt { TOpt& ChoicesWithCompletion(std::vector choices) { Completer(NComp::Choice(choices)); - THashSet choicesSet; + std::unordered_set choicesSet; choicesSet.reserve(choices.size()); for (const auto& choice : choices) { choicesSet.insert(choice.Choice); diff --git a/library/cpp/getopt/small/last_getopt_parser.h b/library/cpp/getopt/small/last_getopt_parser.h index 3a1305e8db0..f2f8441aa7d 100644 --- a/library/cpp/getopt/small/last_getopt_parser.h +++ b/library/cpp/getopt/small/last_getopt_parser.h @@ -48,7 +48,7 @@ namespace NLastGetopt { std::string_view CurrentValue_; // the value of the last met argument (corresponding to CurrentOpt_) private: - typedef THashSet TdOptSet; + typedef std::unordered_set TdOptSet; TdOptSet OptsSeen_; //the set of options that have been met during parsing std::list OptsDefault_; diff --git a/library/cpp/http/io/compression_ut.cpp b/library/cpp/http/io/compression_ut.cpp index 51e6ce8b75e..af145c82263 100644 --- a/library/cpp/http/io/compression_ut.cpp +++ b/library/cpp/http/io/compression_ut.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include Y_UNIT_TEST_SUITE(THttpCompressionTest) { static const std::string DATA = "I'm a teapot"; @@ -45,7 +45,7 @@ Y_UNIT_TEST_SUITE(THttpCompressionTest) { } Y_UNIT_TEST(TestChooseBestCompressionScheme) { - THashSet accepted; + std::unordered_set accepted; auto checkAccepted = [&accepted](const std::string& v) { return accepted.contains(v); diff --git a/library/cpp/http/io/stream.cpp b/library/cpp/http/io/stream.cpp index 5afd7006b4a..b4a8e53165a 100644 --- a/library/cpp/http/io/stream.cpp +++ b/library/cpp/http/io/stream.cpp @@ -18,7 +18,7 @@ #include -#include +#include #define HEADERCMP(header, str) \ case sizeof(str) - 1: \ @@ -129,7 +129,7 @@ namespace { } class THttpInput::TImpl { - typedef THashSet TAcceptCodings; + typedef std::unordered_set TAcceptCodings; public: inline TImpl(IInputStream* slave) diff --git a/library/cpp/http/server/http_ut.cpp b/library/cpp/http/server/http_ut.cpp index e4f4b2b4a7e..5526d150a73 100644 --- a/library/cpp/http/server/http_ut.cpp +++ b/library/cpp/http/server/http_ut.cpp @@ -970,7 +970,7 @@ Y_UNIT_TEST_SUITE(THttpServerTest) { } - inline std::string ToString(const THashSet& hs) { + inline std::string ToString(const std::unordered_set& hs) { std::string res = ""; for (auto s : hs) { if (res) { @@ -998,7 +998,7 @@ Y_UNIT_TEST_SUITE(THttpServerTest) { UNIT_ASSERT(srv.Start()); UNIT_ASSERT(server.Lock.try_lock()); - THashSet results; + std::unordered_set results; std::mutex resultLock; auto func = [port, &resultLock, &results]() { try { @@ -1016,6 +1016,6 @@ Y_UNIT_TEST_SUITE(THttpServerTest) { server.Lock.unlock(); t1->Join(); t2->Join(); - UNIT_ASSERT_EQUAL_C(results, (THashSet({"Zoooo", "TTL Exceed"})), "Results is {" + ToString(results) + "}"); + UNIT_ASSERT_EQUAL_C(results, (std::unordered_set({"Zoooo", "TTL Exceed"})), "Results is {" + ToString(results) + "}"); } } diff --git a/library/cpp/http/server/options.cpp b/library/cpp/http/server/options.cpp index 1432fe6d015..b0a1f7ca1e3 100644 --- a/library/cpp/http/server/options.cpp +++ b/library/cpp/http/server/options.cpp @@ -4,8 +4,8 @@ #include #include #include -#include #include +#include using TAddr = THttpServerOptions::TAddr; @@ -22,7 +22,7 @@ static inline TNetworkAddress ToNetworkAddr(const std::string& address, ui16 por } void THttpServerOptions::BindAddresses(TBindAddresses& ret) const { - THashSet check; + std::unordered_set check; for (auto addr : BindSockaddr) { if (!addr.Port) { diff --git a/library/cpp/monlib/encode/prometheus/prometheus_encoder.cpp b/library/cpp/monlib/encode/prometheus/prometheus_encoder.cpp index 05a4dcd2d26..5609b2ed09f 100644 --- a/library/cpp/monlib/encode/prometheus/prometheus_encoder.cpp +++ b/library/cpp/monlib/encode/prometheus/prometheus_encoder.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include namespace NMonitoring { @@ -191,7 +191,7 @@ namespace NMonitoring { private: IOutputStream* Out_; - THashSet WrittenTypes_; + std::unordered_set WrittenTypes_; char TmpBuf_[512]; // used to convert doubles to strings }; diff --git a/library/cpp/monlib/service/auth.cpp b/library/cpp/monlib/service/auth.cpp index ddabcfbbf74..1b5d922e8ac 100644 --- a/library/cpp/monlib/service/auth.cpp +++ b/library/cpp/monlib/service/auth.cpp @@ -1,6 +1,5 @@ #include "auth.h" -#include namespace NMonitoring { diff --git a/library/cpp/string_utils/url/url.cpp b/library/cpp/string_utils/url/url.cpp index e293e3193f5..32205dfd448 100644 --- a/library/cpp/string_utils/url/url.cpp +++ b/library/cpp/string_utils/url/url.cpp @@ -12,7 +12,6 @@ #include // for ToLower #include #include -#include #include #include diff --git a/library/cpp/testing/common/ut/network_ut.cpp b/library/cpp/testing/common/ut/network_ut.cpp index eafb8d04103..fd15231af4a 100644 --- a/library/cpp/testing/common/ut/network_ut.cpp +++ b/library/cpp/testing/common/ut/network_ut.cpp @@ -1,7 +1,6 @@ #include #include -#include #include #include @@ -23,7 +22,7 @@ TEST(NetworkTest, FreePort) { ports.push_back(NTesting::GetFreePort()); } - THashSet uniqPorts; + std::unordered_set uniqPorts; for (auto& port : ports) { const std::string guardPath = TmpDir.Path() / ToString(static_cast(port)); EXPECT_TRUE(NFs::Exists(guardPath)); diff --git a/library/cpp/testing/unittest/utmain.cpp b/library/cpp/testing/unittest/utmain.cpp index 889bee71a7b..c1c2e844e18 100644 --- a/library/cpp/testing/unittest/utmain.cpp +++ b/library/cpp/testing/unittest/utmain.cpp @@ -15,7 +15,6 @@ #include #include -#include #include #include @@ -589,10 +588,10 @@ class TColoredProcessor: public ITestSuiteProcessor, public NColorizer::TColors bool PrintAfterSuite_; bool PrintTimes_; bool PrintSummary_; - THashSet DisabledSuites_; - THashSet EnabledSuites_; - THashSet DisabledTests_; - THashSet EnabledTests_; + std::unordered_set DisabledSuites_; + std::unordered_set EnabledSuites_; + std::unordered_set DisabledTests_; + std::unordered_set EnabledTests_; TInstant PrevTime_; bool ShowFails; std::vector Fails; diff --git a/library/cpp/yt/string/format-inl.h b/library/cpp/yt/string/format-inl.h index 6cfbf58cba3..caa440a3134 100644 --- a/library/cpp/yt/string/format-inl.h +++ b/library/cpp/yt/string/format-inl.h @@ -17,6 +17,7 @@ #include #include +#include namespace NYT { @@ -353,21 +354,21 @@ struct TValueFormatter> } }; -// THashSet +// std::unordered_set template -struct TValueFormatter> +struct TValueFormatter> { - static void Do(TStringBuilderBase* builder, const THashSet& collection, std::string_view /*format*/) + static void Do(TStringBuilderBase* builder, const std::unordered_set& collection, std::string_view /*format*/) { FormatRange(builder, collection, TDefaultFormatter()); } }; -// THashMultiSet +// std::unordered_multiset template -struct TValueFormatter> +struct TValueFormatter> { - static void Do(TStringBuilderBase* builder, const THashMultiSet& collection, std::string_view /*format*/) + static void Do(TStringBuilderBase* builder, const std::unordered_multiset& collection, std::string_view /*format*/) { FormatRange(builder, collection, TDefaultFormatter()); } diff --git a/library/cpp/yt/string/unittests/format_ut.cpp b/library/cpp/yt/string/unittests/format_ut.cpp index 141db2620a3..a00a6b31cde 100644 --- a/library/cpp/yt/string/unittests/format_ut.cpp +++ b/library/cpp/yt/string/unittests/format_ut.cpp @@ -25,9 +25,9 @@ static_assert(TFormatTraits>::HasCustomFormatValue); static_assert(TFormatTraits>::HasCustomFormatValue); static_assert(TFormatTraits>::HasCustomFormatValue); static_assert(TFormatTraits>::HasCustomFormatValue); -static_assert(TFormatTraits>::HasCustomFormatValue); +static_assert(TFormatTraits>::HasCustomFormatValue); static_assert(TFormatTraits>::HasCustomFormatValue); -static_assert(TFormatTraits>::HasCustomFormatValue); +static_assert(TFormatTraits>::HasCustomFormatValue); static_assert(TFormatTraits>::HasCustomFormatValue); static_assert(TFormatTraits>::HasCustomFormatValue); static_assert(TFormatTraits::HasCustomFormatValue); diff --git a/util/CMakeLists.txt b/util/CMakeLists.txt index b11b7712842..77f25069c4b 100644 --- a/util/CMakeLists.txt +++ b/util/CMakeLists.txt @@ -69,7 +69,6 @@ target_joined_source(yutil ${CMAKE_SOURCE_DIR}/util/generic/hash_multi_map.cpp ${CMAKE_SOURCE_DIR}/util/generic/hash_table.cpp ${CMAKE_SOURCE_DIR}/util/generic/hash_primes.cpp - ${CMAKE_SOURCE_DIR}/util/generic/hash_set.cpp ${CMAKE_SOURCE_DIR}/util/generic/hide_ptr.cpp ${CMAKE_SOURCE_DIR}/util/generic/intrlist.cpp ${CMAKE_SOURCE_DIR}/util/generic/is_in.cpp @@ -144,29 +143,22 @@ target_joined_source(yutil ) target_joined_source(yutil all_stream.cpp - ${CMAKE_SOURCE_DIR}/util/stream/aligned.cpp ${CMAKE_SOURCE_DIR}/util/stream/buffer.cpp ${CMAKE_SOURCE_DIR}/util/stream/buffered.cpp ${CMAKE_SOURCE_DIR}/util/stream/debug.cpp - ${CMAKE_SOURCE_DIR}/util/stream/direct_io.cpp ${CMAKE_SOURCE_DIR}/util/stream/file.cpp ${CMAKE_SOURCE_DIR}/util/stream/format.cpp ${CMAKE_SOURCE_DIR}/util/stream/fwd.cpp ${CMAKE_SOURCE_DIR}/util/stream/hex.cpp - ${CMAKE_SOURCE_DIR}/util/stream/holder.cpp ${CMAKE_SOURCE_DIR}/util/stream/input.cpp - ${CMAKE_SOURCE_DIR}/util/stream/labeled.cpp ${CMAKE_SOURCE_DIR}/util/stream/length.cpp ${CMAKE_SOURCE_DIR}/util/stream/mem.cpp ${CMAKE_SOURCE_DIR}/util/stream/multi.cpp ${CMAKE_SOURCE_DIR}/util/stream/null.cpp ${CMAKE_SOURCE_DIR}/util/stream/output.cpp - ${CMAKE_SOURCE_DIR}/util/stream/pipe.cpp ${CMAKE_SOURCE_DIR}/util/stream/str.cpp ${CMAKE_SOURCE_DIR}/util/stream/tee.cpp ${CMAKE_SOURCE_DIR}/util/stream/tempbuf.cpp - ${CMAKE_SOURCE_DIR}/util/stream/tokenizer.cpp - ${CMAKE_SOURCE_DIR}/util/stream/trace.cpp ${CMAKE_SOURCE_DIR}/util/stream/walk.cpp ${CMAKE_SOURCE_DIR}/util/stream/zerocopy.cpp ${CMAKE_SOURCE_DIR}/util/stream/zerocopy_output.cpp diff --git a/util/generic/fwd.h b/util/generic/fwd.h index c79738fc54f..8404ba9b3e1 100644 --- a/util/generic/fwd.h +++ b/util/generic/fwd.h @@ -51,12 +51,6 @@ class THashMap; template , class EqualKey = TEqualTo, class Alloc = std::allocator> class THashMultiMap; -template , class EqualKey = TEqualTo, class Alloc = std::allocator> -class THashSet; - -template , class EqualKey = TEqualTo, class Alloc = std::allocator> -class THashMultiSet; - template > class TList; diff --git a/util/generic/hash_set.cpp b/util/generic/hash_set.cpp deleted file mode 100644 index 8fabeeabd87..00000000000 --- a/util/generic/hash_set.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "hash_set.h" diff --git a/util/generic/hash_set.h b/util/generic/hash_set.h deleted file mode 100644 index cb86b72106e..00000000000 --- a/util/generic/hash_set.h +++ /dev/null @@ -1,490 +0,0 @@ -#pragma once - -#include "fwd.h" -#include "hash.h" - -#include - -#include -#include - -#undef value_type - -template -class THashSet { -private: - using ht = THashTable; - ht rep; - - using mutable_iterator = typename ht::iterator; - -public: - using key_type = typename ht::key_type; - using value_type = typename ht::value_type; - using hasher = typename ht::hasher; - using key_equal = typename ht::key_equal; - using allocator_type = typename ht::allocator_type; - using node_allocator_type = typename ht::node_allocator_type; - - using size_type = typename ht::size_type; - using difference_type = typename ht::difference_type; - using pointer = typename ht::const_pointer; - using const_pointer = typename ht::const_pointer; - using reference = typename ht::const_reference; - using const_reference = typename ht::const_reference; - - using iterator = typename ht::const_iterator; - using const_iterator = typename ht::const_iterator; - using insert_ctx = typename ht::insert_ctx; - - hasher hash_function() const { - return rep.hash_function(); - } - key_equal key_eq() const { - return rep.key_eq(); - } - -public: - THashSet() { - } - template - explicit THashSet(TT* allocParam, size_type n = 0) - : rep(n, hasher(), key_equal(), allocParam) - { - } - explicit THashSet(size_type n) - : rep(n, hasher(), key_equal()) - { - } - THashSet(size_type n, const hasher& hf) - : rep(n, hf, key_equal()) - { - } - THashSet(size_type n, const hasher& hf, const key_equal& eql) - : rep(n, hf, eql) - { - } - - THashSet(std::initializer_list list) - : rep(list.size(), hasher(), key_equal()) - { - rep.insert_unique(list.begin(), list.end()); - } - THashSet(std::initializer_list list, size_type n) - : rep(n, hasher(), key_equal()) - { - rep.insert_unique(list.begin(), list.end()); - } - THashSet(std::initializer_list list, size_type n, const hasher& hf) - : rep(n, hf, key_equal()) - { - rep.insert_unique(list.begin(), list.end()); - } - THashSet(std::initializer_list list, size_type n, const hasher& hf, const key_equal& eql) - : rep(n, hf, eql) - { - rep.insert_unique(list.begin(), list.end()); - } - - template - THashSet(InputIterator f, InputIterator l) - : rep(0, hasher(), key_equal()) - { - rep.insert_unique(f, l); - } - template - THashSet(InputIterator f, InputIterator l, size_type n) - : rep(n, hasher(), key_equal()) - { - rep.insert_unique(f, l); - } - template - THashSet(InputIterator f, InputIterator l, size_type n, - const hasher& hf) - : rep(n, hf, key_equal()) - { - rep.insert_unique(f, l); - } - template - THashSet(InputIterator f, InputIterator l, size_type n, - const hasher& hf, const key_equal& eql) - : rep(n, hf, eql) - { - rep.insert_unique(f, l); - } - - // THashSet has implicit copy/move constructors and copy-/move-assignment operators - // because its implementation is backed by THashTable. - // See hash_ut.cpp - -public: - size_type size() const { - return rep.size(); - } - size_type max_size() const { - return rep.max_size(); - } - - Y_PURE_FUNCTION bool empty() const { - return rep.empty(); - } - explicit operator bool() const noexcept { - return !empty(); - } - void swap(THashSet& hs) { - rep.swap(hs.rep); - } - - iterator begin() const { - return rep.begin(); - } - iterator end() const { - return rep.end(); - } - iterator cbegin() const { - return rep.begin(); - } - iterator cend() const { - return rep.end(); - } - -public: - void insert(std::initializer_list ilist) { - insert(ilist.begin(), ilist.end()); - } - - template - void insert(InputIterator f, InputIterator l) { - rep.insert_unique(f, l); - } - - std::pair insert(const value_type& obj) { - std::pair p = rep.insert_unique(obj); - return std::pair(p.first, p.second); - } - template - std::pair emplace(Args&&... args) { - std::pair p = rep.emplace_unique(std::forward(args)...); - return std::pair(p.first, p.second); - } - - iterator insert(const_iterator, const value_type& obj) { // insert_hint - std::pair p = rep.insert_unique(obj); - return p.first; - } - - std::pair insert_noresize(const value_type& obj) { - std::pair p = rep.insert_unique_noresize(obj); - return std::pair(p.first, p.second); - } - template - std::pair emplace_noresize(Args&&... args) { - std::pair p = rep.emplace_unique_noresize(std::forward(args)...); - return std::pair(p.first, p.second); - } - - template - iterator insert_direct(const TheObj& obj, const insert_ctx& ins) { - return rep.insert_direct(obj, ins); - } - template - iterator emplace_direct(const insert_ctx& ins, Args&&... args) { - return rep.emplace_direct(ins, std::forward(args)...); - } - - template - const_iterator find(const TheKey& key) const { - return rep.find(key); - } - template - iterator find(const TheKey& key, insert_ctx& ins) { - return rep.find_i(key, ins); - } - - template - bool contains(const TheKey& key) const { - return rep.find(key) != rep.end(); - } - template - bool contains(const TheKey& key, insert_ctx& ins) { - return rep.find_i(key, ins) != rep.end(); - } - - template - size_type count(const TKey& key) const { - return rep.count(key); - } - - template - std::pair equal_range(const TKey& key) const { - return rep.equal_range(key); - } - - size_type erase(const key_type& key) { - return rep.erase_one(key); - } - void erase(iterator it) { - rep.erase(it); - } - void erase(iterator f, iterator l) { - rep.erase(f, l); - } - Y_REINITIALIZES_OBJECT void clear() { - rep.clear(); - } - Y_REINITIALIZES_OBJECT void clear(size_t downsize_hint) { - rep.clear(downsize_hint); - } - Y_REINITIALIZES_OBJECT void basic_clear() { - rep.basic_clear(); - } - void release_nodes() { - rep.release_nodes(); - } - - template - int save_for_st(IOutputStream* stream, KeySaver& ks) const { - return rep.template save_for_st(stream, ks); - } - -public: - void reserve(size_type hint) { - rep.reserve(hint); - } - size_type bucket_count() const { - return rep.bucket_count(); - } - size_type bucket_size(size_type n) const { - return rep.bucket_size(n); - } - node_allocator_type& GetNodeAllocator() { - return rep.GetNodeAllocator(); - } -}; - -template -inline bool operator==(const THashSet& hs1, const THashSet& hs2) { - if (hs1.size() != hs2.size()) { - return false; - } - for (const auto& it : hs1) { - if (!hs2.contains(it)) { - return false; - } - } - return true; -} - -template -inline bool operator!=(const THashSet& hs1, const THashSet& hs2) { - return !(hs1 == hs2); -} - -template -class THashMultiSet { -private: - using ht = THashTable; - ht rep; - -public: - using key_type = typename ht::key_type; - using value_type = typename ht::value_type; - using hasher = typename ht::hasher; - using key_equal = typename ht::key_equal; - using allocator_type = typename ht::allocator_type; - using node_allocator_type = typename ht::node_allocator_type; - - using size_type = typename ht::size_type; - using difference_type = typename ht::difference_type; - using pointer = typename ht::const_pointer; - using const_pointer = typename ht::const_pointer; - using reference = typename ht::const_reference; - using const_reference = typename ht::const_reference; - - using iterator = typename ht::const_iterator; - using const_iterator = typename ht::const_iterator; - - hasher hash_function() const { - return rep.hash_function(); - } - key_equal key_eq() const { - return rep.key_eq(); - } - -public: - THashMultiSet() - : rep(0, hasher(), key_equal()) - { - } - explicit THashMultiSet(size_type n) - : rep(n, hasher(), key_equal()) - { - } - THashMultiSet(size_type n, const hasher& hf) - : rep(n, hf, key_equal()) - { - } - THashMultiSet(size_type n, const hasher& hf, const key_equal& eql) - : rep(n, hf, eql) - { - } - - template - THashMultiSet(InputIterator f, InputIterator l) - : rep(0, hasher(), key_equal()) - { - rep.insert_equal(f, l); - } - template - THashMultiSet(InputIterator f, InputIterator l, size_type n) - : rep(n, hasher(), key_equal()) - { - rep.insert_equal(f, l); - } - template - THashMultiSet(InputIterator f, InputIterator l, size_type n, - const hasher& hf) - : rep(n, hf, key_equal()) - { - rep.insert_equal(f, l); - } - template - THashMultiSet(InputIterator f, InputIterator l, size_type n, - const hasher& hf, const key_equal& eql) - : rep(n, hf, eql) - { - rep.insert_equal(f, l); - } - - THashMultiSet(std::initializer_list list) - : rep(list.size(), hasher(), key_equal()) - { - rep.insert_equal(list.begin(), list.end()); - } - - // THashMultiSet has implicit copy/move constructors and copy-/move-assignment operators - // because its implementation is backed by THashTable. - // See hash_ut.cpp - -public: - size_type size() const { - return rep.size(); - } - size_type max_size() const { - return rep.max_size(); - } - - Y_PURE_FUNCTION bool empty() const { - return rep.empty(); - } - explicit operator bool() const noexcept { - return !empty(); - } - void swap(THashMultiSet& hs) { - rep.swap(hs.rep); - } - - iterator begin() const { - return rep.begin(); - } - iterator end() const { - return rep.end(); - } - iterator cbegin() const { - return rep.begin(); - } - iterator cend() const { - return rep.end(); - } - -public: - iterator insert(const value_type& obj) { - return rep.insert_equal(obj); - } - template - iterator emplace(Args&&... args) { - return rep.emplace_equal(std::forward(args)...); - } - template - void insert(InputIterator f, InputIterator l) { - rep.insert_equal(f, l); - } - iterator insert_noresize(const value_type& obj) { - return rep.insert_equal_noresize(obj); - } - - template - iterator find(const TKey& key) const { - return rep.find(key); - } - - template - size_type count(const TKey& key) const { - return rep.count(key); - } - - template - std::pair equal_range(const TKey& key) const { - return rep.equal_range(key); - } - - size_type erase(const key_type& key) { - return rep.erase(key); - } - void erase(iterator it) { - rep.erase(it); - } - void erase(iterator f, iterator l) { - rep.erase(f, l); - } - Y_REINITIALIZES_OBJECT void clear() { - rep.clear(); - } - Y_REINITIALIZES_OBJECT void clear(size_t downsize_hint) { - rep.clear(downsize_hint); - } - Y_REINITIALIZES_OBJECT void basic_clear() { - rep.basic_clear(); - } - void release_nodes() { - rep.release_nodes(); - } - -public: - void reserve(size_type hint) { - rep.reserve(hint); - } - size_type bucket_count() const { - return rep.bucket_count(); - } - size_type bucket_size(size_type n) const { - return rep.bucket_size(n); - } - node_allocator_type& GetNodeAllocator() { - return rep.GetNodeAllocator(); - } -}; - -template -inline bool operator==(const THashMultiSet& hs1, const THashMultiSet& hs2) { - if (hs1.size() != hs2.size()) { - return false; - } - EqualKey equalKey; - auto it = hs1.begin(); - while (it != hs1.end()) { - const auto& value = *it; - size_t count = 0; - for (; (it != hs1.end()) && (equalKey(*it, value)); ++it, ++count) { - } - if (hs2.count(value) != count) { - return false; - } - } - return true; -} - -template -inline bool operator!=(const THashMultiSet& hs1, const THashMultiSet& hs2) { - return !(hs1 == hs2); -} diff --git a/util/generic/hash_set.pxd b/util/generic/hash_set.pxd deleted file mode 100644 index d28d90cbe77..00000000000 --- a/util/generic/hash_set.pxd +++ /dev/null @@ -1,43 +0,0 @@ -from libcpp.pair cimport pair - -cdef extern from "util/generic/hash_set.h" nogil: - cdef cppclass THashSet[T]: - cppclass iterator: - T& operator*() - iterator operator++() - iterator operator--() - bint operator==(iterator) - bint operator!=(iterator) - - cppclass const_iterator(iterator): - pass - - THashSet() except + - THashSet(THashSet&) except + - THashSet(T* t) except + - THashSet& operator=(THashSet&) - - bint operator==(THashSet&) - bint operator!=(THashSet&) - bint operator<(THashSet&) - bint operator>(THashSet&) - bint operator<=(THashSet&) - bint operator>=(THashSet&) - - iterator begin() - const_iterator const_begin "begin"() - void clear() - size_t count(T&) - bint empty() - iterator end() - const_iterator const_end "end"() - void erase(iterator) except + - void erase(iterator, iterator) except + - size_t erase(T&) - iterator find(T&) - bint contains(T&) - const_iterator const_find "find"(T&) - pair[iterator, bint] insert(T) - iterator insert(iterator, T) - size_t size() - void swap(THashSet&) diff --git a/util/generic/hash_set_ut.pyx b/util/generic/hash_set_ut.pyx deleted file mode 100644 index b431df5682a..00000000000 --- a/util/generic/hash_set_ut.pyx +++ /dev/null @@ -1,53 +0,0 @@ -# cython: c_string_type=str, c_string_encoding=utf8 - -from util.generic.hash_set cimport THashSet -from util.generic.string cimport std::string - -import pytest -import unittest - -from cython.operator cimport dereference as deref - - -class TestHashSet(unittest.TestCase): - - def test_simple_constructor_equality_operator(self): - cdef THashSet[int] c1 - c1.insert(1) - assert c1.size() == 1 - c1.insert(2) - c1.insert(2) - c1.insert(2) - c1.insert(2) - assert c1.size() == 2 - assert c1.contains(2) - assert not c1.contains(5) - cdef THashSet[int] c2 = c1 - assert c1 == c2 - c1.insert(3) - assert c1 != c2 - c1.erase(3) - assert c1 == c2 - - def test_insert_erase(self): - cdef THashSet[std::string] tmp - self.assertTrue(tmp.insert("one").second) - self.assertFalse(tmp.insert("one").second) - self.assertTrue(tmp.insert("two").second) - cdef std::string one = "one" - cdef std::string two = "two" - self.assertEqual(tmp.erase(one), 1) - self.assertEqual(tmp.erase(two), 1) - self.assertEqual(tmp.size(), 0) - self.assertTrue(tmp.empty()) - - def test_iterators_and_find(self): - cdef THashSet[std::string] tmp - self.assertTrue(tmp.begin() == tmp.end()) - self.assertTrue(tmp.find("1") == tmp.end()) - tmp.insert("1") - self.assertTrue(tmp.begin() != tmp.end()) - cdef THashSet[std::string].iterator it = tmp.find("1") - self.assertTrue(it != tmp.end()) - self.assertEqual(deref(it), "1") - diff --git a/util/generic/hash_ut.cpp b/util/generic/hash_ut.cpp index eb8f8bb334d..a89c8b409f0 100644 --- a/util/generic/hash_ut.cpp +++ b/util/generic/hash_ut.cpp @@ -1,7 +1,6 @@ #include "hash.h" #include "hash_multi_map.h" #include "vector.h" -#include "hash_set.h" #include #include diff --git a/util/generic/is_in_ut.cpp b/util/generic/is_in_ut.cpp index d07e39bdfd5..0b71872d218 100644 --- a/util/generic/is_in_ut.cpp +++ b/util/generic/is_in_ut.cpp @@ -3,7 +3,6 @@ #include "algorithm.h" #include "hash.h" #include "hash_multi_map.h" -#include "hash_set.h" #include "is_in.h" #include "set.h" #include "string.h" @@ -45,8 +44,8 @@ Y_UNIT_TEST_SUITE(TIsIn) { TestIsInWithCont>("found"); TestIsInWithCont>("found"); - TestIsInWithCont>("found"); - TestIsInWithCont>("found"); + TestIsInWithCont>("found"); + TestIsInWithCont>("found"); // vector also compiles and works std::vector v; diff --git a/util/generic/ptr_ut.cpp b/util/generic/ptr_ut.cpp index ba2176ffb15..6a57b7cd3be 100644 --- a/util/generic/ptr_ut.cpp +++ b/util/generic/ptr_ut.cpp @@ -5,7 +5,6 @@ #include #include -#include #include #include @@ -741,7 +740,7 @@ void TPointerTest::TestComparison() { template void TPointerTest::TestRefCountedPtrsInHashSetImpl() { - THashSet hashSet; + std::unordered_set hashSet; TRefCountedPtr p1(new T()); UNIT_ASSERT(!IsIn(hashSet, p1)); UNIT_ASSERT(hashSet.insert(p1).second); diff --git a/util/memory/smallobj_ut.cpp b/util/memory/smallobj_ut.cpp index 86003d1d534..7f8ede6df72 100644 --- a/util/memory/smallobj_ut.cpp +++ b/util/memory/smallobj_ut.cpp @@ -2,7 +2,6 @@ #include -#include class TSmallObjAllocTest: public TTestBase { struct TClass: public TObjectFromPool { @@ -61,7 +60,7 @@ class TSmallObjAllocTest: public TTestBase { inline void TestAllocate() { TClass::TPool pool(TDefaultAllocator::Instance()); - THashSet alloced; + std::unordered_set alloced; for (size_t i = 0; i < 10000; ++i) { TClass* c = new (&pool) TClass; diff --git a/util/network/endpoint_ut.cpp b/util/network/endpoint_ut.cpp index 69a1c650060..1b31fe12212 100644 --- a/util/network/endpoint_ut.cpp +++ b/util/network/endpoint_ut.cpp @@ -2,7 +2,7 @@ #include -#include +#include Y_UNIT_TEST_SUITE(TEndpointTest) { Y_UNIT_TEST(TestSimple) { @@ -63,7 +63,7 @@ Y_UNIT_TEST_SUITE(TEndpointTest) { ep3_.SetPort(54321); - THashSet he; + std::unordered_set he; he.insert(ep0); he.insert(ep1); diff --git a/util/network/socket.cpp b/util/network/socket.cpp index f57bd630ac7..35ebd7edcb8 100644 --- a/util/network/socket.cpp +++ b/util/network/socket.cpp @@ -6,6 +6,7 @@ #include #include +#include #if defined(_unix_) #include @@ -41,7 +42,6 @@ #include #include #include -#include #include #include @@ -947,7 +947,7 @@ void TSocketOutput::DoWriteV(const TPart* parts, size_t count) { namespace { //https://bugzilla.mozilla.org/attachment.cgi?id=503263&action=diff - struct TLocalNames: public THashSet { + struct TLocalNames: public std::unordered_set { inline TLocalNames() { insert("localhost"); insert("localhost.localdomain"); diff --git a/util/thread/pool_ut.cpp b/util/thread/pool_ut.cpp index 1110c00d382..0003ccb988e 100644 --- a/util/thread/pool_ut.cpp +++ b/util/thread/pool_ut.cpp @@ -204,12 +204,12 @@ Y_UNIT_TEST_SUITE(TThreadPoolTest) { } } - void TestEnumeratedThreadName(IThreadPool& pool, const THashSet& expectedNames) { + void TestEnumeratedThreadName(IThreadPool& pool, const std::unordered_set& expectedNames) { pool.Start(expectedNames.size()); std::mutex lock; std::condition_variable allReady; size_t readyCount = 0; - THashSet names; + std::unordered_set names; for (size_t i = 0; i < expectedNames.size(); ++i) { pool.SafeAddFunc([&]() { std::unique_lock ulock(lock); @@ -231,7 +231,7 @@ Y_UNIT_TEST_SUITE(TThreadPoolTest) { Y_UNIT_TEST(TestEnumeratedThreadName) { const std::string namePrefix = "HelloWorld"; - const THashSet expectedNames = { + const std::unordered_set expectedNames = { "HelloWorld0", "HelloWorld1", "HelloWorld2", diff --git a/util/ysaveload.h b/util/ysaveload.h index 9251ab8391b..a0343a384cc 100644 --- a/util/ysaveload.h +++ b/util/ysaveload.h @@ -14,6 +14,7 @@ #include #include #include +#include #ifndef __NVCC__ // cuda is compiled in C++14 mode at the time @@ -528,8 +529,8 @@ class TSetSerializerInserter, TValue, false>: }; template -class TSetSerializerInserter, TValue, false>: public TSetSerializerInserterBase, TValue> { - using TSetType = THashSet; +class TSetSerializerInserter, TValue, false>: public TSetSerializerInserterBase, TValue> { + using TSetType = std::unordered_set; using TBase = TSetSerializerInserterBase; public: @@ -605,7 +606,7 @@ class TSerializer>: public TSetSerializer, t }; template -class TSerializer>: public TSetSerializer, false> { +class TSerializer>: public TSetSerializer, false> { }; template diff --git a/util/ysaveload_ut.cpp b/util/ysaveload_ut.cpp index a7c60e0cf30..aeac208413d 100644 --- a/util/ysaveload_ut.cpp +++ b/util/ysaveload_ut.cpp @@ -10,7 +10,6 @@ #include #include -#include static inline char* AllocateFromPool(TMemoryPool& pool, size_t len) { return (char*)pool.Allocate(len); @@ -278,7 +277,7 @@ class TSaveLoadTest: public TTestBase { UNIT_ASSERT_EQUAL(multimap.find((ui16)1)->second, 2); UNIT_ASSERT_EQUAL(multimap.find((ui16)3)->second, 6); - THashSet values; + std::unordered_set values; auto range = multimap.equal_range((ui16)2); for (auto i = range.first; i != range.second; ++i) { values.insert(i->second); From 9b2fde3e35f64f076464707c6509c9bb089f4fc7 Mon Sep 17 00:00:00 2001 From: SvRgK11010 Date: Sun, 7 Apr 2024 12:19:09 +0300 Subject: [PATCH 2/5] Fixed errors from checks --- library/cpp/getopt/small/last_getopt_opt.h | 1 + library/cpp/testing/common/ut/network_ut.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/library/cpp/getopt/small/last_getopt_opt.h b/library/cpp/getopt/small/last_getopt_opt.h index d8021b904d7..ab91a3df6c9 100644 --- a/library/cpp/getopt/small/last_getopt_opt.h +++ b/library/cpp/getopt/small/last_getopt_opt.h @@ -12,6 +12,7 @@ #include #include #include +#include namespace NLastGetopt { enum EHasArg { diff --git a/library/cpp/testing/common/ut/network_ut.cpp b/library/cpp/testing/common/ut/network_ut.cpp index fd15231af4a..d240353d78e 100644 --- a/library/cpp/testing/common/ut/network_ut.cpp +++ b/library/cpp/testing/common/ut/network_ut.cpp @@ -9,6 +9,7 @@ #include #include +#include static TTempDir TmpDir; From 73b512da68dc16e6639dce175592aafabcd7a487 Mon Sep 17 00:00:00 2001 From: SvRgK11010 Date: Sun, 7 Apr 2024 15:39:38 +0300 Subject: [PATCH 3/5] another little commit --- library/cpp/cache/cache.h | 1 - library/cpp/getopt/small/last_getopt_opt.h | 1 - 2 files changed, 2 deletions(-) diff --git a/library/cpp/cache/cache.h b/library/cpp/cache/cache.h index e96fad7bf03..39c43e5af67 100644 --- a/library/cpp/cache/cache.h +++ b/library/cpp/cache/cache.h @@ -336,7 +336,6 @@ class TLWList { TValue Value; TWeight Weight; - struct THash { using is_transparent = void; size_t operator()(const TItem& item) const { diff --git a/library/cpp/getopt/small/last_getopt_opt.h b/library/cpp/getopt/small/last_getopt_opt.h index ab91a3df6c9..27c97301bbc 100644 --- a/library/cpp/getopt/small/last_getopt_opt.h +++ b/library/cpp/getopt/small/last_getopt_opt.h @@ -6,7 +6,6 @@ #include #include #include -//#include #include #include From f3a7122c06a4354861a396a1c3bf4da81003baee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B2=D0=B5=D1=82=D0=BB=D0=B0=D0=BD=D0=B0?= <122363204+SvRgK11010@users.noreply.github.com> Date: Tue, 9 Apr 2024 22:12:49 +0300 Subject: [PATCH 4/5] Update cache.h --- library/cpp/cache/cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/cpp/cache/cache.h b/library/cpp/cache/cache.h index 39c43e5af67..95711b95fd8 100644 --- a/library/cpp/cache/cache.h +++ b/library/cpp/cache/cache.h @@ -769,4 +769,4 @@ class TLWCache: public TCacheFindByItem(TBase::List.GetLightest()); } -}; \ No newline at end of file +}; From 73cc2bc568987e384677a07c221b9d05d269f847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B2=D0=B5=D1=82=D0=BB=D0=B0=D0=BD=D0=B0?= <122363204+SvRgK11010@users.noreply.github.com> Date: Tue, 9 Apr 2024 22:13:26 +0300 Subject: [PATCH 5/5] Update fwd.h --- util/generic/fwd.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/util/generic/fwd.h b/util/generic/fwd.h index a5b64f20330..153de927d35 100644 --- a/util/generic/fwd.h +++ b/util/generic/fwd.h @@ -45,9 +45,6 @@ class THashMap; template , class EqualKey = TEqualTo, class Alloc = std::allocator> class THashMultiMap; -template > -class TList; - template , class A = std::allocator> class TSet;