aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/string/format-inl.h
diff options
context:
space:
mode:
authorpavook <pavook@yandex-team.com>2024-09-19 14:51:46 +0300
committerpavook <pavook@yandex-team.com>2024-09-19 15:05:50 +0300
commitaa20162565ccc09b8d98b4c8d3fa73766c9cc2e8 (patch)
treeeab1f42ee8538e27648ee1c39e7f8025c024ed1d /library/cpp/yt/string/format-inl.h
parentca7cae796560215047e6455f764c6ce09c3fe6a7 (diff)
downloadydb-aa20162565ccc09b8d98b4c8d3fa73766c9cc2e8.tar.gz
std::variant formatter: require that arguments are formattable
commit_hash:f3123d7cb2022bdc565cc9aadd347deb2cd235d3
Diffstat (limited to 'library/cpp/yt/string/format-inl.h')
-rw-r--r--library/cpp/yt/string/format-inl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/cpp/yt/string/format-inl.h b/library/cpp/yt/string/format-inl.h
index 2fe988f7d9..188a699a3d 100644
--- a/library/cpp/yt/string/format-inl.h
+++ b/library/cpp/yt/string/format-inl.h
@@ -633,6 +633,7 @@ inline void FormatValue(TStringBuilderBase* builder, const std::monostate&, TStr
// std::variant
template <class... Ts>
+ requires (CFormattable<Ts> && ...)
void FormatValue(TStringBuilderBase* builder, const std::variant<Ts...>& variant, TStringBuf spec)
{
[&] <size_t... Ids> (std::index_sequence<Ids...>) {