diff options
author | dgolear <dgolear@yandex-team.com> | 2022-09-23 13:54:50 +0300 |
---|---|---|
committer | dgolear <dgolear@yandex-team.com> | 2022-09-23 13:54:50 +0300 |
commit | 9ce5be3812d329e848be6de9ce89d693860a811d (patch) | |
tree | 94c8cae2c24b13f43e20dc8229c0aae790b9a566 /library/cpp | |
parent | 35565dd653766afe92cfb96b830cb444f8f59533 (diff) | |
download | ydb-9ce5be3812d329e848be6de9ce89d693860a811d.tar.gz |
Support logic time in ORM
Diffstat (limited to 'library/cpp')
-rw-r--r-- | library/cpp/yt/misc/CMakeLists.txt | 1 | ||||
-rw-r--r-- | library/cpp/yt/misc/variant.cpp | 16 | ||||
-rw-r--r-- | library/cpp/yt/misc/variant.h | 4 |
3 files changed, 21 insertions, 0 deletions
diff --git a/library/cpp/yt/misc/CMakeLists.txt b/library/cpp/yt/misc/CMakeLists.txt index 502ac788e8..696f0f2bed 100644 --- a/library/cpp/yt/misc/CMakeLists.txt +++ b/library/cpp/yt/misc/CMakeLists.txt @@ -16,4 +16,5 @@ target_link_libraries(cpp-yt-misc PUBLIC target_sources(cpp-yt-misc PRIVATE ${CMAKE_SOURCE_DIR}/library/cpp/yt/misc/guid.cpp ${CMAKE_SOURCE_DIR}/library/cpp/yt/misc/source_location.cpp + ${CMAKE_SOURCE_DIR}/library/cpp/yt/misc/variant.cpp ) diff --git a/library/cpp/yt/misc/variant.cpp b/library/cpp/yt/misc/variant.cpp new file mode 100644 index 0000000000..be86affef8 --- /dev/null +++ b/library/cpp/yt/misc/variant.cpp @@ -0,0 +1,16 @@ +#include "variant.h" + +#include <library/cpp/yt/string/string_builder.h> + +namespace NYT { + +//////////////////////////////////////////////////////////////////////////////// + +void FormatValue(TStringBuilderBase* builder, const std::monostate&, TStringBuf /*format*/) +{ + builder->AppendString(TStringBuf("<monostate>")); +} + +//////////////////////////////////////////////////////////////////////////////// + +} // namespace NYT diff --git a/library/cpp/yt/misc/variant.h b/library/cpp/yt/misc/variant.h index 21e16ec60e..1c8a3c9019 100644 --- a/library/cpp/yt/misc/variant.h +++ b/library/cpp/yt/misc/variant.h @@ -1,5 +1,7 @@ #pragma once +#include <util/generic/string.h> + #include <variant> namespace NYT { @@ -11,6 +13,8 @@ class TStringBuilderBase; template <class... Ts> void FormatValue(TStringBuilderBase* builder, const std::variant<Ts...>& variant, TStringBuf spec); +void FormatValue(TStringBuilderBase* builder, const std::monostate&, TStringBuf /*format*/); + template <class... Ts> TString ToString(const std::variant<Ts...>& variant); |