diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:17 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:17 +0300 |
commit | d3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch) | |
tree | dd4bd3ca0f36b817e96812825ffaf10d645803f2 /util/draft/holder_vector.h | |
parent | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff) | |
download | ydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'util/draft/holder_vector.h')
-rw-r--r-- | util/draft/holder_vector.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/util/draft/holder_vector.h b/util/draft/holder_vector.h index 3095371dfa..1c62055bd9 100644 --- a/util/draft/holder_vector.h +++ b/util/draft/holder_vector.h @@ -2,16 +2,16 @@ #include <util/generic/ptr.h> #include <util/generic/vector.h> -#include <util/generic/noncopyable.h> +#include <util/generic/noncopyable.h> -template <class T, class D = TDelete> +template <class T, class D = TDelete> class THolderVector: public TVector<T*>, public TNonCopyable { using TBase = TVector<T*>; - + public: explicit THolderVector(size_t n = 0) - : TBase(n) - { + : TBase(n) + { } ~THolderVector() { @@ -34,7 +34,7 @@ public: void PushBack(T* t) { try { TBase::push_back(t); - } catch (...) { + } catch (...) { if (t) D::Destroy(t); throw; @@ -85,18 +85,18 @@ public: using TBase::operator[]; using TBase::operator bool; using TBase::at; - using TBase::back; - using TBase::begin; + using TBase::back; + using TBase::begin; using TBase::capacity; using TBase::empty; - using TBase::end; + using TBase::end; using TBase::front; using TBase::reserve; - using TBase::size; - - using typename TBase::const_iterator; - using typename TBase::const_reverse_iterator; - using typename TBase::iterator; - using typename TBase::reverse_iterator; - using typename TBase::value_type; + using TBase::size; + + using typename TBase::const_iterator; + using typename TBase::const_reverse_iterator; + using typename TBase::iterator; + using typename TBase::reverse_iterator; + using typename TBase::value_type; }; |