From 72cb13b4aff9bc9cf22e49251bc8fd143f82538f Mon Sep 17 00:00:00 2001 From: Anton Samokhvalov <pg83@yandex.ru> Date: Thu, 10 Feb 2022 16:45:15 +0300 Subject: Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2. --- library/cpp/containers/stack_vector/stack_vec.h | 26 ++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'library/cpp/containers/stack_vector') 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: -- cgit v1.2.3