diff options
author | thegeorg <thegeorg@yandex-team.ru> | 2022-03-03 13:53:18 +0300 |
---|---|---|
committer | thegeorg <thegeorg@yandex-team.ru> | 2022-03-03 13:53:18 +0300 |
commit | 75b363ad9be455d895aee7f72f45be2d950d3518 (patch) | |
tree | ceef86b4a2c864b1a962dab41a8cd8b3f3ab0bc3 /util/stream | |
parent | 473e96c44443a8567db5ba7ee48110663fcb21c7 (diff) | |
download | ydb-75b363ad9be455d895aee7f72f45be2d950d3518.tar.gz |
Support std::filesystem::path in Arcadia streams
ref:11bbdd83544b9579747dd12d51395840bda86faf
Diffstat (limited to 'util/stream')
-rw-r--r-- | util/stream/output.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/util/stream/output.cpp b/util/stream/output.cpp index db81b81b70..d84b3ad4d0 100644 --- a/util/stream/output.cpp +++ b/util/stream/output.cpp @@ -16,9 +16,10 @@ #endif #include <cerrno> +#include <cstdio> +#include <filesystem> #include <string> #include <string_view> -#include <cstdio> #if defined(_win_) #include <io.h> @@ -114,6 +115,14 @@ void Out<std::u32string_view>(IOutputStream& o, const std::u32string_view& p) { WriteString(o, p.data(), p.length()); } +#ifndef USE_STL_SYSTEM +// FIXME thegeorg@: remove #ifndef upon raising minimal macOS version to 10.15 in https://st.yandex-team.ru/DTCC-836 +template <> +void Out<std::filesystem::path>(IOutputStream& o, const std::filesystem::path& p) { + o.Write(p.string()); +} +#endif + template <> void Out<TStringBuf>(IOutputStream& o, const TStringBuf& p) { o.Write(p.data(), p.length()); |