diff options
| author | vasko <[email protected]> | 2026-02-27 10:15:10 +0300 |
|---|---|---|
| committer | vasko <[email protected]> | 2026-02-27 11:01:16 +0300 |
| commit | 46878746325da24b281589e6f63bc256be0652d7 (patch) | |
| tree | 2710e71dee64f6c50d446dc59170ce1762f98f3e /library/cpp/yt/string | |
| parent | 57d34083689a35fe289576245e97435d59a41c19 (diff) | |
[yt string] move some dependencies out for 32bit build support
многие либы тянут yt/string и получают транизитивно compact\_container, который в большинстве случаев не используется (и не собирается под 32 бита)
убираю это зависимость через forward decl (всё что делает string с compact\_container это задаёт концепты, которым не нужно полное определение)
commit_hash:611af702c90f87ab98e05df17ec992bd2a972488
Diffstat (limited to 'library/cpp/yt/string')
| -rw-r--r-- | library/cpp/yt/string/format-inl.h | 19 | ||||
| -rw-r--r-- | library/cpp/yt/string/unittests/format_ut.cpp | 1 | ||||
| -rw-r--r-- | library/cpp/yt/string/ya.make | 2 |
3 files changed, 14 insertions, 8 deletions
diff --git a/library/cpp/yt/string/format-inl.h b/library/cpp/yt/string/format-inl.h index 3279177dfb6..9900cdcee3c 100644 --- a/library/cpp/yt/string/format-inl.h +++ b/library/cpp/yt/string/format-inl.h @@ -10,10 +10,6 @@ #include <library/cpp/yt/assert/assert.h> -#include <library/cpp/yt/compact_containers/compact_vector.h> -#include <library/cpp/yt/compact_containers/compact_flat_map.h> -#include <library/cpp/yt/compact_containers/compact_flat_set.h> - #include <library/cpp/yt/containers/enum_indexed_array.h> #include <library/cpp/yt/misc/concepts.h> @@ -83,6 +79,17 @@ TString ToStringIgnoringFormatValue(const T& t) return s; } +// Forward declarations to avoid dependencies, that are not needed by all clients. + +template <class T, size_t N> +class TCompactVector; + +template <class TValue, size_t N> +class TCompactFlatSet; + +template <class TKey, class TValue, size_t N, class TKeyCompare> +class TCompactFlatMap; + //////////////////////////////////////////////////////////////////////////////// // Helper functions for formatting. @@ -167,8 +174,8 @@ template <class... Ts> constexpr bool CKnownKVRange<THashMultiMap<Ts...>> = true; template <class... Ts> constexpr bool CKnownKVRange<TCompactFlatMap<Ts...>> = true; -template <class K, class V, size_t N> -constexpr bool CKnownKVRange<TCompactFlatMap<K, V, N>> = true; +template <class K, class V, size_t N, class C> +constexpr bool CKnownKVRange<TCompactFlatMap<K, V, N, C>> = true; template <class T, size_t N> constexpr bool CKnownRange<TCompactFlatSet<T, N>> = true; diff --git a/library/cpp/yt/string/unittests/format_ut.cpp b/library/cpp/yt/string/unittests/format_ut.cpp index a6c5ef6837f..804d6f09831 100644 --- a/library/cpp/yt/string/unittests/format_ut.cpp +++ b/library/cpp/yt/string/unittests/format_ut.cpp @@ -2,6 +2,7 @@ #include <library/cpp/yt/string/format.h> +#include <library/cpp/yt/compact_containers/compact_flat_map.h> #include <library/cpp/yt/compact_containers/compact_vector.h> #include <util/generic/hash_set.h> diff --git a/library/cpp/yt/string/ya.make b/library/cpp/yt/string/ya.make index 11926fec185..d22a6bf2b7f 100644 --- a/library/cpp/yt/string/ya.make +++ b/library/cpp/yt/string/ya.make @@ -15,7 +15,6 @@ PEERDIR( library/cpp/yt/assert library/cpp/yt/exception library/cpp/yt/misc - library/cpp/yt/compact_containers ) CHECK_DEPENDENT_DIRS( @@ -26,7 +25,6 @@ CHECK_DEPENDENT_DIRS( util library/cpp/yt/assert library/cpp/yt/misc - library/cpp/yt/compact_containers ) END() |
