diff options
author | swarmer <swarmer@yandex-team.ru> | 2022-02-10 16:46:31 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:31 +0300 |
commit | 11a24635da4c4f39428b182c49a7bc35e47c9534 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/generic/array_ref.h | |
parent | 317da38588b7898a99fd9168571408123350012b (diff) | |
download | ydb-11a24635da4c4f39428b182c49a7bc35e47c9534.tar.gz |
Restoring authorship annotation for <swarmer@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/array_ref.h')
-rw-r--r-- | util/generic/array_ref.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/util/generic/array_ref.h b/util/generic/array_ref.h index f8bc42e179..1ac60ac7d3 100644 --- a/util/generic/array_ref.h +++ b/util/generic/array_ref.h @@ -35,39 +35,39 @@ public: using reverse_iterator = std::reverse_iterator<iterator>; using const_reverse_iterator = std::reverse_iterator<const_iterator>; - constexpr inline TArrayRef() noexcept + constexpr inline TArrayRef() noexcept : T_(nullptr) , S_(0) { } - constexpr inline TArrayRef(T* data, size_t len) noexcept + constexpr inline TArrayRef(T* data, size_t len) noexcept : T_(data) , S_(len) { } - constexpr inline TArrayRef(T* begin, T* end) noexcept + constexpr inline TArrayRef(T* begin, T* end) noexcept : T_(begin) , S_(end - begin) { } - constexpr inline TArrayRef(std::initializer_list<T> list) noexcept + constexpr inline TArrayRef(std::initializer_list<T> list) noexcept : T_(list.begin()) , S_(list.size()) { } template <class Container> - constexpr inline TArrayRef(Container&& container, decltype(std::declval<T*&>() = container.data(), nullptr) = nullptr) noexcept + constexpr inline TArrayRef(Container&& container, decltype(std::declval<T*&>() = container.data(), nullptr) = nullptr) noexcept : T_(container.data()) , S_(container.size()) { } template <size_t N> - constexpr inline TArrayRef(T (&array)[N]) noexcept + constexpr inline TArrayRef(T (&array)[N]) noexcept : T_(array) , S_(N) { @@ -250,12 +250,12 @@ TArrayRef<char> as_writable_bytes(TArrayRef<T> arrayRef) noexcept { } template <class Range> -constexpr TArrayRef<const typename Range::value_type> MakeArrayRef(const Range& range) { +constexpr TArrayRef<const typename Range::value_type> MakeArrayRef(const Range& range) { return TArrayRef<const typename Range::value_type>(range); } template <class Range> -constexpr TArrayRef<typename Range::value_type> MakeArrayRef(Range& range) { +constexpr TArrayRef<typename Range::value_type> MakeArrayRef(Range& range) { return TArrayRef<typename Range::value_type>(range); } @@ -270,11 +270,11 @@ constexpr TArrayRef<const typename Range::value_type> MakeConstArrayRef(Range& r } template <class T> -constexpr TArrayRef<T> MakeArrayRef(T* data, size_t size) { +constexpr TArrayRef<T> MakeArrayRef(T* data, size_t size) { return TArrayRef<T>(data, size); } template <class T> -constexpr TArrayRef<T> MakeArrayRef(T* begin, T* end) { +constexpr TArrayRef<T> MakeArrayRef(T* begin, T* end) { return TArrayRef<T>(begin, end); } |