aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/misc/enum.h
diff options
context:
space:
mode:
authorbabenko <babenko@yandex-team.com>2024-11-03 15:01:37 +0300
committerbabenko <babenko@yandex-team.com>2024-11-03 15:13:18 +0300
commit1d9c1fe4155c9fbc93a2b08754643f38b2d8a9e6 (patch)
tree4304bf131c70c48c008b0823149420636f213b46 /library/cpp/yt/misc/enum.h
parent516aec4353c6dc63d05883924b1f29d327db6413 (diff)
downloadydb-1d9c1fe4155c9fbc93a2b08754643f38b2d8a9e6.tar.gz
YT-22885: Refactor checked casts
commit_hash:7f7600d332c3ddb5c8372e921bcba3b4fbed68f8
Diffstat (limited to 'library/cpp/yt/misc/enum.h')
-rw-r--r--library/cpp/yt/misc/enum.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/cpp/yt/misc/enum.h b/library/cpp/yt/misc/enum.h
index d9611b2823..331eb59f1a 100644
--- a/library/cpp/yt/misc/enum.h
+++ b/library/cpp/yt/misc/enum.h
@@ -89,8 +89,10 @@ struct TEnumTraits<T, true>
static constexpr std::optional<T> TryGetUnknownValue();
static std::optional<TStringBuf> FindLiteralByValue(T value);
static std::optional<T> FindValueByLiteral(TStringBuf literal);
+
static constexpr bool IsKnownValue(T value)
requires (!TEnumTraitsImpl<T>::IsBitEnum);
+ static constexpr bool IsValidValue(T value);
static TString ToString(T value);
static T FromString(TStringBuf literal);