diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/containers/stack_vector/stack_vec.h | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/containers/stack_vector/stack_vec.h')
-rw-r--r-- | library/cpp/containers/stack_vector/stack_vec.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/containers/stack_vector/stack_vec.h b/library/cpp/containers/stack_vector/stack_vec.h index fcc5d9a2a5..0108642da1 100644 --- a/library/cpp/containers/stack_vector/stack_vec.h +++ b/library/cpp/containers/stack_vector/stack_vec.h @@ -20,27 +20,27 @@ using TSmallVec = TStackVec<T, 16, true, Alloc>; template <typename T, size_t CountOnStack = 256> using TStackOnlyVec = TStackVec<T, CountOnStack, false>; -namespace NPrivate { - template <class Alloc, class StackAlloc, typename T, typename U> - struct TRebind { +namespace NPrivate { + template <class Alloc, class StackAlloc, typename T, typename U> + struct TRebind { typedef TReboundAllocator<Alloc, U> other; }; - template <class Alloc, class StackAlloc, typename T> - struct TRebind<Alloc, StackAlloc, T, T> { + template <class Alloc, class StackAlloc, typename T> + struct TRebind<Alloc, StackAlloc, T, T> { typedef StackAlloc other; }; template <typename T, size_t CountOnStack, bool UseFallbackAlloc, class Alloc = std::allocator<T>> - class TStackBasedAllocator: public Alloc { + class TStackBasedAllocator: public Alloc { public: typedef TStackBasedAllocator<T, CountOnStack, UseFallbackAlloc, Alloc> TSelf; - using typename Alloc::difference_type; + using typename Alloc::difference_type; using typename Alloc::size_type; - using typename Alloc::value_type; + using typename Alloc::value_type; - template <class U> + template <class U> struct rebind: public ::NPrivate::TRebind<Alloc, TSelf, T, U> { }; @@ -89,7 +89,7 @@ namespace NPrivate { return static_cast<Alloc&>(*this); } }; -} +} template <typename T, size_t CountOnStack, bool UseFallbackAlloc, class Alloc> class TStackVec: public TVector<T, ::NPrivate::TStackBasedAllocator<T, CountOnStack, UseFallbackAlloc, TReboundAllocator<Alloc, T>>> { @@ -98,11 +98,11 @@ private: using TAllocator = typename TBase::allocator_type; public: - using typename TBase::const_iterator; - using typename TBase::const_reverse_iterator; + using typename TBase::const_iterator; + using typename TBase::const_reverse_iterator; using typename TBase::iterator; using typename TBase::reverse_iterator; - using typename TBase::size_type; + using typename TBase::size_type; using typename TBase::value_type; public: |