diff options
author | kvk1920 <kvk1920@yandex-team.com> | 2022-12-08 11:53:17 +0300 |
---|---|---|
committer | kvk1920 <kvk1920@yandex-team.com> | 2022-12-08 11:53:17 +0300 |
commit | bddb2f7be1188971cade9973d4c79f1ba9cee946 (patch) | |
tree | d23dc4e469ab3def1fe59ff48a2fd96831e85598 | |
parent | eed92b7f0e540b51866213f2e2e044305591b747 (diff) | |
download | ydb-bddb2f7be1188971cade9973d4c79f1ba9cee946.tar.gz |
Node maintenance requests
-rw-r--r-- | library/cpp/yt/misc/enum-inl.h | 4 | ||||
-rw-r--r-- | library/cpp/yt/misc/enum.h | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/library/cpp/yt/misc/enum-inl.h b/library/cpp/yt/misc/enum-inl.h index 59ef704775..86515e8a4e 100644 --- a/library/cpp/yt/misc/enum-inl.h +++ b/library/cpp/yt/misc/enum-inl.h @@ -263,12 +263,12 @@ TStringBuf TEnumTraits<T, true>::GetTypeName() //////////////////////////////////////////////////////////////////////////////// template <class E, class T, E Min, E Max> -TEnumIndexedVector<E, T, Min, Max>::TEnumIndexedVector() +constexpr TEnumIndexedVector<E, T, Min, Max>::TEnumIndexedVector() : Items_{} { } template <class E, class T, E Min, E Max> -TEnumIndexedVector<E, T, Min, Max>::TEnumIndexedVector(std::initializer_list<T> elements) +constexpr TEnumIndexedVector<E, T, Min, Max>::TEnumIndexedVector(std::initializer_list<T> elements) : Items_{} { Y_ASSERT(std::distance(elements.begin(), elements.end()) <= N); diff --git a/library/cpp/yt/misc/enum.h b/library/cpp/yt/misc/enum.h index 894364aa43..774fa0fdf8 100644 --- a/library/cpp/yt/misc/enum.h +++ b/library/cpp/yt/misc/enum.h @@ -204,8 +204,14 @@ public: using TIndex = E; using TValue = T; - TEnumIndexedVector(); - TEnumIndexedVector(std::initializer_list<T> elements); + constexpr TEnumIndexedVector(); + constexpr TEnumIndexedVector(std::initializer_list<T> elements); + + constexpr TEnumIndexedVector(const TEnumIndexedVector&) = default; + constexpr TEnumIndexedVector(TEnumIndexedVector&&) noexcept = default; + + constexpr TEnumIndexedVector& operator=(const TEnumIndexedVector&) = default; + constexpr TEnumIndexedVector& operator=(TEnumIndexedVector&&) noexcept = default; T& operator[] (E index); const T& operator[] (E index) const; |