aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/vector.h
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:17 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:17 +0300
commitd3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch)
treedd4bd3ca0f36b817e96812825ffaf10d645803f2 /util/generic/vector.h
parent72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff)
downloadydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/vector.h')
-rw-r--r--util/generic/vector.h64
1 files changed, 32 insertions, 32 deletions
diff --git a/util/generic/vector.h b/util/generic/vector.h
index 2b81f9c4a9b..a5b258955a8 100644
--- a/util/generic/vector.h
+++ b/util/generic/vector.h
@@ -3,28 +3,28 @@
#include "fwd.h"
#include "reserve.h"
-#include <util/memory/alloc.h>
-
-#include <vector>
+#include <util/memory/alloc.h>
+
+#include <vector>
#include <initializer_list>
-
+
template <class T, class A>
class TVector: public std::vector<T, TReboundAllocator<A, T>> {
-public:
+public:
using TBase = std::vector<T, TReboundAllocator<A, T>>;
using TSelf = TVector<T, A>;
using size_type = typename TBase::size_type;
-
+
inline TVector()
- : TBase()
- {
- }
-
+ : TBase()
+ {
+ }
+
inline TVector(const typename TBase::allocator_type& a)
- : TBase(a)
- {
- }
-
+ : TBase(a)
+ {
+ }
+
inline explicit TVector(::NDetail::TReserveTag rt)
: TBase()
{
@@ -38,20 +38,20 @@ public:
}
inline explicit TVector(size_type count)
- : TBase(count)
- {
- }
-
+ : TBase(count)
+ {
+ }
+
inline explicit TVector(size_type count, const typename TBase::allocator_type& a)
: TBase(count, a)
{
}
inline TVector(size_type count, const T& val)
- : TBase(count, val)
- {
- }
-
+ : TBase(count, val)
+ {
+ }
+
inline TVector(size_type count, const T& val, const typename TBase::allocator_type& a)
: TBase(count, val, a)
{
@@ -69,20 +69,20 @@ public:
inline TVector(const TSelf& src)
: TBase(src)
- {
- }
+ {
+ }
inline TVector(TSelf&& src) noexcept
: TBase(std::forward<TSelf>(src))
{
}
- template <class TIter>
+ template <class TIter>
inline TVector(TIter first, TIter last)
- : TBase(first, last)
- {
- }
-
+ : TBase(first, last)
+ {
+ }
+
inline TSelf& operator=(const TSelf& src) {
TBase::operator=(src);
return *this;
@@ -98,17 +98,17 @@ public:
return *this;
}
- inline explicit operator bool() const noexcept {
+ inline explicit operator bool() const noexcept {
return !this->empty();
}
- Y_PURE_FUNCTION inline bool empty() const noexcept {
+ Y_PURE_FUNCTION inline bool empty() const noexcept {
return TBase::empty();
}
inline yssize_t ysize() const noexcept {
return (yssize_t)TBase::size();
- }
+ }
#ifdef _YNDX_LIBCXX_ENABLE_VECTOR_POD_RESIZE_UNINITIALIZED
void yresize(size_type newSize) {