diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
commit | 8cbc307de0221f84c80c42dcbe07d40727537e2c (patch) | |
tree | 625d5a673015d1df891e051033e9fcde5c7be4e5 /util/generic/flags.h | |
parent | 30d1ef3941e0dc835be7609de5ebee66958f215a (diff) | |
download | ydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz |
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic/flags.h')
-rw-r--r-- | util/generic/flags.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/util/generic/flags.h b/util/generic/flags.h index a1f5921d42..3b0eb4a2e2 100644 --- a/util/generic/flags.h +++ b/util/generic/flags.h @@ -6,9 +6,9 @@ #include <util/generic/typetraits.h> #include <util/generic/fwd.h> -class IOutputStream; +class IOutputStream; namespace NPrivate { - void PrintFlags(IOutputStream& stream, ui64 value, size_t size); + void PrintFlags(IOutputStream& stream, ui64 value, size_t size); } /** @@ -34,10 +34,10 @@ namespace NPrivate { template <class Enum> class TFlags { static_assert(std::is_enum<Enum>::value, "Expecting an enumeration here."); - + public: using TEnum = Enum; - using TInt = std::underlying_type_t<Enum>; + using TInt = std::underlying_type_t<Enum>; constexpr TFlags(std::nullptr_t = 0) : Value_(0) @@ -79,18 +79,18 @@ public: return TFlags(TFlag(l.Value_ ^ r.Value_)); } - constexpr friend TFlags - operator^(TEnum l, TFlags r) { + constexpr friend TFlags + operator^(TEnum l, TFlags r) { return TFlags(TFlag(static_cast<TInt>(l) ^ r.Value_)); } - constexpr friend TFlags - operator^(TFlags l, TEnum r) { + constexpr friend TFlags + operator^(TFlags l, TEnum r) { return TFlags(TFlag(l.Value_ ^ static_cast<TInt>(r))); } - constexpr friend TFlags - operator&(TFlags l, TFlags r) { + constexpr friend TFlags + operator&(TFlags l, TFlags r) { return TFlags(TFlag(l.Value_ & r.Value_)); } @@ -177,7 +177,7 @@ public: return *this; } - friend IOutputStream& operator<<(IOutputStream& stream, const TFlags& flags) { + friend IOutputStream& operator<<(IOutputStream& stream, const TFlags& flags) { ::NPrivate::PrintFlags(stream, static_cast<ui64>(flags.Value_), sizeof(TInt)); return stream; } |