aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic
diff options
context:
space:
mode:
authorspacelord <spacelord@yandex-team.ru>2022-02-10 16:48:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:15 +0300
commit16747e4f77455cca4932df21eb76f12cb0a97a5c (patch)
tree4dd6da4102d99d0d69dec53c1050d290a850a9f2 /util/generic
parenta817f5de12611ec73085eba17f8ec7740a46bdb7 (diff)
downloadydb-16747e4f77455cca4932df21eb76f12cb0a97a5c.tar.gz
Restoring authorship annotation for <spacelord@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic')
-rw-r--r--util/generic/bitmap.h22
-rw-r--r--util/generic/bitmap_ut.cpp6
-rw-r--r--util/generic/buffer.h4
-rw-r--r--util/generic/hash.h138
-rw-r--r--util/generic/hash_set.h56
-rw-r--r--util/generic/hash_ut.cpp6
-rw-r--r--util/generic/intrlist.h62
-rw-r--r--util/generic/map_ut.cpp10
-rw-r--r--util/generic/noncopyable.h2
-rw-r--r--util/generic/ptr.h6
-rw-r--r--util/generic/ptr_ut.cpp26
-rw-r--r--util/generic/refcount.h6
-rw-r--r--util/generic/strbase.h12
-rw-r--r--util/generic/strbuf.h2
-rw-r--r--util/generic/string.h6
-rw-r--r--util/generic/typelist.h4
-rw-r--r--util/generic/typelist_ut.cpp2
-rw-r--r--util/generic/typetraits.h2
-rw-r--r--util/generic/utility.h2
-rw-r--r--util/generic/vector.h2
-rw-r--r--util/generic/ylimits_ut.cpp18
21 files changed, 197 insertions, 197 deletions
diff --git a/util/generic/bitmap.h b/util/generic/bitmap.h
index f77d182460..8f7d3f2aa4 100644
--- a/util/generic/bitmap.h
+++ b/util/generic/bitmap.h
@@ -152,7 +152,7 @@ namespace NBitMapPrivate {
template <size_t BitCount, typename TChunkType>
struct TFixedStorage {
- using TChunk = TChunkType;
+ using TChunk = TChunkType;
static constexpr size_t Size = (BitCount + 8 * sizeof(TChunk) - 1) / (8 * sizeof(TChunk));
@@ -202,7 +202,7 @@ namespace NBitMapPrivate {
// It uses "on stack" realization with no allocation for one chunk spaces
template <typename TChunkType>
struct TDynamicStorage {
- using TChunk = TChunkType;
+ using TChunk = TChunkType;
size_t Size;
TChunk StackData;
@@ -298,21 +298,21 @@ namespace NBitMapPrivate {
template <size_t BitCount, typename TChunkType>
struct TFixedBitMapTraits {
- using TChunk = TChunkType;
- using TStorage = NBitMapPrivate::TFixedStorage<BitCount, TChunkType>;
+ using TChunk = TChunkType;
+ using TStorage = NBitMapPrivate::TFixedStorage<BitCount, TChunkType>;
};
template <typename TChunkType>
struct TDynamicBitMapTraits {
- using TChunk = TChunkType;
- using TStorage = NBitMapPrivate::TDynamicStorage<TChunkType>;
+ using TChunk = TChunkType;
+ using TStorage = NBitMapPrivate::TDynamicStorage<TChunkType>;
};
template <class TTraits>
class TBitMapOps {
public:
- using TChunk = typename TTraits::TChunk;
- using TThis = TBitMapOps<TTraits>;
+ using TChunk = typename TTraits::TChunk;
+ using TThis = TBitMapOps<TTraits>;
private:
static_assert(std::is_unsigned<TChunk>::value, "expect std::is_unsigned<TChunk>::value");
@@ -325,7 +325,7 @@ private:
template <class>
friend class TBitMapOps;
- using TStorage = typename TTraits::TStorage;
+ using TStorage = typename TTraits::TStorage;
// The smallest unsigned type, which can be used in bit ops
using TIntType = std::conditional_t<sizeof(TChunk) < sizeof(unsigned int), unsigned int, TChunk>;
@@ -1080,7 +1080,7 @@ inline TBitMapOps<X> operator~(const TBitMapOps<X>& x) {
template <size_t BitCount, typename TChunkType /*= ui64*/>
class TBitMap: public TBitMapOps<TFixedBitMapTraits<BitCount, TChunkType>> {
private:
- using TBase = TBitMapOps<TFixedBitMapTraits<BitCount, TChunkType>>;
+ using TBase = TBitMapOps<TFixedBitMapTraits<BitCount, TChunkType>>;
public:
TBitMap()
@@ -1102,7 +1102,7 @@ public:
}
};
-using TDynBitMap = TBitMapOps<TDynamicBitMapTraits<ui64>>;
+using TDynBitMap = TBitMapOps<TDynamicBitMapTraits<ui64>>;
#define Y_FOR_EACH_BIT(var, bitmap) for (size_t var = (bitmap).FirstNonZeroBit(); var != (bitmap).Size(); var = (bitmap).NextNonZeroBit(var))
diff --git a/util/generic/bitmap_ut.cpp b/util/generic/bitmap_ut.cpp
index 087d34a8dc..2d4751e660 100644
--- a/util/generic/bitmap_ut.cpp
+++ b/util/generic/bitmap_ut.cpp
@@ -551,21 +551,21 @@ Y_UNIT_TEST_SUITE(TBitMapTest) {
Y_UNIT_TEST(TestSetResetRange) {
// Single chunk
- using TBitMap1Chunk = TBitMap<64>;
+ using TBitMap1Chunk = TBitMap<64>;
UNIT_ASSERT_EQUAL(TBitMap1Chunk().Flip().Reset(10, 50), TBitMap1Chunk().Set(0, 10).Set(50, 64));
UNIT_ASSERT_EQUAL(TBitMap1Chunk().Flip().Reset(0, 10), TBitMap1Chunk().Set(10, 64));
UNIT_ASSERT_EQUAL(TBitMap1Chunk().Flip().Reset(50, 64), TBitMap1Chunk().Set(0, 50));
UNIT_ASSERT_EQUAL(TBitMap1Chunk().Flip().Reset(0, 10).Reset(50, 64), TBitMap1Chunk().Set(10, 50));
// Two chunks
- using TBitMap2Chunks = TBitMap<64, ui32>;
+ using TBitMap2Chunks = TBitMap<64, ui32>;
UNIT_ASSERT_EQUAL(TBitMap2Chunks().Flip().Reset(10, 50), TBitMap2Chunks().Set(0, 10).Set(50, 64));
UNIT_ASSERT_EQUAL(TBitMap2Chunks().Flip().Reset(0, 10), TBitMap2Chunks().Set(10, 64));
UNIT_ASSERT_EQUAL(TBitMap2Chunks().Flip().Reset(50, 64), TBitMap2Chunks().Set(0, 50));
UNIT_ASSERT_EQUAL(TBitMap2Chunks().Flip().Reset(0, 10).Reset(50, 64), TBitMap2Chunks().Set(10, 50));
// Many chunks
- using TBitMap4Chunks = TBitMap<64, ui16>;
+ using TBitMap4Chunks = TBitMap<64, ui16>;
UNIT_ASSERT_EQUAL(TBitMap4Chunks().Flip().Reset(10, 50), TBitMap4Chunks().Set(0, 10).Set(50, 64));
UNIT_ASSERT_EQUAL(TBitMap4Chunks().Flip().Reset(0, 10), TBitMap4Chunks().Set(10, 64));
UNIT_ASSERT_EQUAL(TBitMap4Chunks().Flip().Reset(50, 64), TBitMap4Chunks().Set(0, 50));
diff --git a/util/generic/buffer.h b/util/generic/buffer.h
index 9576467404..800a556633 100644
--- a/util/generic/buffer.h
+++ b/util/generic/buffer.h
@@ -10,8 +10,8 @@
class TBuffer {
public:
- using TIterator = char*;
- using TConstIterator = const char*;
+ using TIterator = char*;
+ using TConstIterator = const char*;
TBuffer(size_t len = 0);
TBuffer(const char* buf, size_t len);
diff --git a/util/generic/hash.h b/util/generic/hash.h
index e46db21fa9..77eef28ffa 100644
--- a/util/generic/hash.h
+++ b/util/generic/hash.h
@@ -65,11 +65,11 @@ struct __yhashtable_iterator {
using node = __yhashtable_node<Value>;
using iterator_category = std::forward_iterator_tag;
- using value_type = Value;
- using difference_type = ptrdiff_t;
- using size_type = size_t;
- using reference = Value&;
- using pointer = Value*;
+ using value_type = Value;
+ using difference_type = ptrdiff_t;
+ using size_type = size_t;
+ using reference = Value&;
+ using pointer = Value*;
node* cur;
@@ -108,11 +108,11 @@ struct __yhashtable_const_iterator {
using node = __yhashtable_node<Value>;
using iterator_category = std::forward_iterator_tag;
- using value_type = Value;
- using difference_type = ptrdiff_t;
- using size_type = size_t;
- using reference = const Value&;
- using pointer = const Value*;
+ using value_type = Value;
+ using difference_type = ptrdiff_t;
+ using size_type = size_t;
+ using reference = const Value&;
+ using pointer = const Value*;
const node* cur;
@@ -204,21 +204,21 @@ public:
*/
template <class T, class Alloc>
class _yhashtable_buckets: private _allocator_base<Alloc> {
- using base_type = _allocator_base<Alloc>;
+ using base_type = _allocator_base<Alloc>;
static_assert(sizeof(T) == sizeof(size_t), "T is expected to be the same size as size_t.");
public:
- using allocator_type = Alloc;
- using value_type = T;
- using pointer = T*;
- using const_pointer = const T*;
- using reference = T&;
- using const_reference = const T&;
- using iterator = pointer;
- using const_iterator = const_pointer;
- using size_type = size_t;
- using difference_type = ptrdiff_t;
+ using allocator_type = Alloc;
+ using value_type = T;
+ using pointer = T*;
+ using const_pointer = const T*;
+ using reference = T&;
+ using const_reference = const T&;
+ using iterator = pointer;
+ using const_iterator = const_pointer;
+ using size_type = size_t;
+ using difference_type = ptrdiff_t;
using TBucketDivisor = ::NPrivate::THashDivisor;
_yhashtable_buckets(const Alloc& other)
@@ -349,7 +349,7 @@ private:
*/
template <class HashFcn, class ExtractKey, class EqualKey, class Alloc, bool IsEmpty = std::is_empty<HashFcn>::value&& std::is_empty<ExtractKey>::value&& std::is_empty<EqualKey>::value>
class _yhashtable_base: public _allocator_base<Alloc> {
- using base_type = _allocator_base<Alloc>;
+ using base_type = _allocator_base<Alloc>;
public:
_yhashtable_base(const HashFcn& hash, const ExtractKey& extract, const EqualKey& equals, const Alloc& alloc)
@@ -405,7 +405,7 @@ private:
template <class HashFcn, class ExtractKey, class EqualKey, class Alloc>
class _yhashtable_base<HashFcn, ExtractKey, EqualKey, Alloc, true>: public _allocator_base<Alloc> {
- using base_type = _allocator_base<Alloc>;
+ using base_type = _allocator_base<Alloc>;
public:
_yhashtable_base(const HashFcn&, const ExtractKey&, const EqualKey&, const Alloc& alloc)
@@ -451,27 +451,27 @@ extern const void* const _yhashtable_empty_data[];
template <class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
class THashTable: private _yhashtable_traits<Value, Key, HashFcn, ExtractKey, EqualKey, Alloc>::base_type {
using traits_type = _yhashtable_traits<Value, Key, HashFcn, ExtractKey, EqualKey, Alloc>;
- using base_type = typename traits_type::base_type;
- using node = typename traits_type::node;
- using nodep_allocator_type = typename traits_type::nodep_allocator_type;
+ using base_type = typename traits_type::base_type;
+ using node = typename traits_type::node;
+ using nodep_allocator_type = typename traits_type::nodep_allocator_type;
using buckets_type = _yhashtable_buckets<node*, nodep_allocator_type>;
using TBucketDivisor = ::NPrivate::THashDivisor;
public:
- using key_type = Key;
- using value_type = Value;
- using hasher = HashFcn;
- using key_equal = EqualKey;
- using key_extract = ExtractKey;
+ using key_type = Key;
+ using value_type = Value;
+ using hasher = HashFcn;
+ using key_equal = EqualKey;
+ using key_extract = ExtractKey;
using allocator_type = Alloc;
- using node_allocator_type = typename traits_type::node_allocator_type;
+ using node_allocator_type = typename traits_type::node_allocator_type;
- using size_type = size_t;
- using difference_type = ptrdiff_t;
- using pointer = value_type*;
- using const_pointer = const value_type*;
- using reference = value_type&;
- using const_reference = const value_type&;
+ using size_type = size_t;
+ using difference_type = ptrdiff_t;
+ using pointer = value_type*;
+ using const_pointer = const value_type*;
+ using reference = value_type&;
+ using const_reference = const value_type&;
node_allocator_type& GetNodeAllocator() {
return this->_get_alloc();
@@ -513,7 +513,7 @@ private:
public:
using iterator = __yhashtable_iterator<Value>;
using const_iterator = __yhashtable_const_iterator<Value>;
- using insert_ctx = node**;
+ using insert_ctx = node**;
friend struct __yhashtable_iterator<Value>;
friend struct __yhashtable_const_iterator<Value>;
@@ -1428,24 +1428,24 @@ private:
ht rep;
public:
- using key_type = typename ht::key_type;
- using value_type = typename ht::value_type;
- using hasher = typename ht::hasher;
- using key_equal = typename ht::key_equal;
+ using key_type = typename ht::key_type;
+ using value_type = typename ht::value_type;
+ using hasher = typename ht::hasher;
+ using key_equal = typename ht::key_equal;
using allocator_type = typename ht::allocator_type;
- using node_allocator_type = typename ht::node_allocator_type;
- using mapped_type = T;
-
- using size_type = typename ht::size_type;
- using difference_type = typename ht::difference_type;
- using pointer = typename ht::pointer;
- using const_pointer = typename ht::const_pointer;
- using reference = typename ht::reference;
- using const_reference = typename ht::const_reference;
-
- using iterator = typename ht::iterator;
- using const_iterator = typename ht::const_iterator;
- using insert_ctx = typename ht::insert_ctx;
+ using node_allocator_type = typename ht::node_allocator_type;
+ using mapped_type = T;
+
+ using size_type = typename ht::size_type;
+ using difference_type = typename ht::difference_type;
+ using pointer = typename ht::pointer;
+ using const_pointer = typename ht::const_pointer;
+ using reference = typename ht::reference;
+ using const_reference = typename ht::const_reference;
+
+ using iterator = typename ht::iterator;
+ using const_iterator = typename ht::const_iterator;
+ using insert_ctx = typename ht::insert_ctx;
hasher hash_function() const {
return rep.hash_function();
@@ -1760,22 +1760,22 @@ private:
ht rep;
public:
- using key_type = typename ht::key_type;
- using value_type = typename ht::value_type;
- using hasher = typename ht::hasher;
- using key_equal = typename ht::key_equal;
- using mapped_type = T;
+ using key_type = typename ht::key_type;
+ using value_type = typename ht::value_type;
+ using hasher = typename ht::hasher;
+ using key_equal = typename ht::key_equal;
+ using mapped_type = T;
using allocator_type = typename ht::allocator_type;
- using size_type = typename ht::size_type;
- using difference_type = typename ht::difference_type;
- using pointer = typename ht::pointer;
- using const_pointer = typename ht::const_pointer;
- using reference = typename ht::reference;
- using const_reference = typename ht::const_reference;
+ using size_type = typename ht::size_type;
+ using difference_type = typename ht::difference_type;
+ using pointer = typename ht::pointer;
+ using const_pointer = typename ht::const_pointer;
+ using reference = typename ht::reference;
+ using const_reference = typename ht::const_reference;
- using iterator = typename ht::iterator;
- using const_iterator = typename ht::const_iterator;
+ using iterator = typename ht::iterator;
+ using const_iterator = typename ht::const_iterator;
using insert_ctx = typename ht::insert_ctx;
hasher hash_function() const {
diff --git a/util/generic/hash_set.h b/util/generic/hash_set.h
index e8088cf23b..c35c7ceaef 100644
--- a/util/generic/hash_set.h
+++ b/util/generic/hash_set.h
@@ -14,26 +14,26 @@ private:
using ht = THashTable<Value, Value, HashFcn, ::TIdentity, EqualKey, Alloc>;
ht rep;
- using mutable_iterator = typename ht::iterator;
+ using mutable_iterator = typename ht::iterator;
public:
- using key_type = typename ht::key_type;
- using value_type = typename ht::value_type;
- using hasher = typename ht::hasher;
- using key_equal = typename ht::key_equal;
+ using key_type = typename ht::key_type;
+ using value_type = typename ht::value_type;
+ using hasher = typename ht::hasher;
+ using key_equal = typename ht::key_equal;
using allocator_type = typename ht::allocator_type;
- using node_allocator_type = typename ht::node_allocator_type;
+ using node_allocator_type = typename ht::node_allocator_type;
- using size_type = typename ht::size_type;
- using difference_type = typename ht::difference_type;
- using pointer = typename ht::const_pointer;
- using const_pointer = typename ht::const_pointer;
- using reference = typename ht::const_reference;
- using const_reference = typename ht::const_reference;
+ using size_type = typename ht::size_type;
+ using difference_type = typename ht::difference_type;
+ using pointer = typename ht::const_pointer;
+ using const_pointer = typename ht::const_pointer;
+ using reference = typename ht::const_reference;
+ using const_reference = typename ht::const_reference;
- using iterator = typename ht::const_iterator;
- using const_iterator = typename ht::const_iterator;
- using insert_ctx = typename ht::insert_ctx;
+ using iterator = typename ht::const_iterator;
+ using const_iterator = typename ht::const_iterator;
+ using insert_ctx = typename ht::insert_ctx;
hasher hash_function() const {
return rep.hash_function();
@@ -285,22 +285,22 @@ private:
ht rep;
public:
- using key_type = typename ht::key_type;
- using value_type = typename ht::value_type;
- using hasher = typename ht::hasher;
- using key_equal = typename ht::key_equal;
+ using key_type = typename ht::key_type;
+ using value_type = typename ht::value_type;
+ using hasher = typename ht::hasher;
+ using key_equal = typename ht::key_equal;
using allocator_type = typename ht::allocator_type;
- using node_allocator_type = typename ht::node_allocator_type;
+ using node_allocator_type = typename ht::node_allocator_type;
- using size_type = typename ht::size_type;
- using difference_type = typename ht::difference_type;
- using pointer = typename ht::const_pointer;
- using const_pointer = typename ht::const_pointer;
- using reference = typename ht::const_reference;
- using const_reference = typename ht::const_reference;
+ using size_type = typename ht::size_type;
+ using difference_type = typename ht::difference_type;
+ using pointer = typename ht::const_pointer;
+ using const_pointer = typename ht::const_pointer;
+ using reference = typename ht::const_reference;
+ using const_reference = typename ht::const_reference;
- using iterator = typename ht::const_iterator;
- using const_iterator = typename ht::const_iterator;
+ using iterator = typename ht::const_iterator;
+ using const_iterator = typename ht::const_iterator;
hasher hash_function() const {
return rep.hash_function();
diff --git a/util/generic/hash_ut.cpp b/util/generic/hash_ut.cpp
index 0551d58770..f19218f4b1 100644
--- a/util/generic/hash_ut.cpp
+++ b/util/generic/hash_ut.cpp
@@ -606,7 +606,7 @@ void THashTest::TestHMSetEmplace() {
void THashTest::TestInsertErase() {
using hmap = THashMap<TString, size_t, THash<TString>, TEqualTo<TString>>;
- using val_type = hmap::value_type;
+ using val_type = hmap::value_type;
{
hmap values;
@@ -645,7 +645,7 @@ namespace {
}
};
- using TItemPtr = TIntrusivePtr<TItem>;
+ using TItemPtr = TIntrusivePtr<TItem>;
struct TSelectKey {
const TString& operator()(const TItemPtr& item) const {
@@ -783,7 +783,7 @@ class TCountingAllocator: public std::allocator<T> {
using base_type = std::allocator<T>;
public:
- using size_type = typename base_type::size_type;
+ using size_type = typename base_type::size_type;
template <class Other>
struct rebind {
diff --git a/util/generic/intrlist.h b/util/generic/intrlist.h
index b5d3f2051b..88262e3839 100644
--- a/util/generic/intrlist.h
+++ b/util/generic/intrlist.h
@@ -126,16 +126,16 @@ private:
template <class TListItem, class TNode>
class TIteratorBase {
public:
- using TItem = TListItem;
- using TReference = TNode&;
- using TPointer = TNode*;
+ using TItem = TListItem;
+ using TReference = TNode&;
+ using TPointer = TNode*;
using iterator_category = std::bidirectional_iterator_tag;
- using difference_type = ptrdiff_t;
+ using difference_type = ptrdiff_t;
- using value_type = TNode;
- using reference = TReference;
- using pointer = TPointer;
+ using value_type = TNode;
+ using reference = TReference;
+ using pointer = TPointer;
inline TIteratorBase() noexcept
: Item_(nullptr)
@@ -218,16 +218,16 @@ private:
template <class TIterator>
class TReverseIteratorBase {
public:
- using TItem = typename TIterator::TItem;
- using TReference = typename TIterator::TReference;
- using TPointer = typename TIterator::TPointer;
+ using TItem = typename TIterator::TItem;
+ using TReference = typename TIterator::TReference;
+ using TPointer = typename TIterator::TPointer;
- using iterator_category = typename TIterator::iterator_category;
- using difference_type = typename TIterator::difference_type;
+ using iterator_category = typename TIterator::iterator_category;
+ using difference_type = typename TIterator::difference_type;
- using value_type = typename TIterator::value_type;
- using reference = typename TIterator::reference;
- using pointer = typename TIterator::pointer;
+ using value_type = typename TIterator::value_type;
+ using reference = typename TIterator::reference;
+ using pointer = typename TIterator::pointer;
inline TReverseIteratorBase() noexcept = default;
@@ -315,17 +315,17 @@ private:
};
public:
- using TIterator = TIteratorBase<TListItem, T>;
- using TConstIterator = TIteratorBase<const TListItem, const T>;
+ using TIterator = TIteratorBase<TListItem, T>;
+ using TConstIterator = TIteratorBase<const TListItem, const T>;
- using TReverseIterator = TReverseIteratorBase<TIterator>;
- using TConstReverseIterator = TReverseIteratorBase<TConstIterator>;
+ using TReverseIterator = TReverseIteratorBase<TIterator>;
+ using TConstReverseIterator = TReverseIteratorBase<TConstIterator>;
- using iterator = TIterator;
- using const_iterator = TConstIterator;
+ using iterator = TIterator;
+ using const_iterator = TConstIterator;
- using reverse_iterator = TReverseIterator;
- using const_reverse_iterator = TConstReverseIterator;
+ using reverse_iterator = TReverseIterator;
+ using const_reverse_iterator = TConstReverseIterator;
public:
inline void Swap(TIntrusiveList& right) noexcept {
@@ -593,11 +593,11 @@ public:
using TReverseIterator = typename TIntrusiveList<T, Tag>::TReverseIterator;
using TConstReverseIterator = typename TIntrusiveList<T, Tag>::TConstReverseIterator;
- using iterator = TIterator;
- using const_iterator = TConstIterator;
+ using iterator = TIterator;
+ using const_iterator = TConstIterator;
- using reverse_iterator = TReverseIterator;
- using const_reverse_iterator = TConstReverseIterator;
+ using reverse_iterator = TReverseIterator;
+ using const_reverse_iterator = TConstReverseIterator;
public:
inline TIntrusiveListWithAutoDelete() noexcept = default;
@@ -741,11 +741,11 @@ public:
};
public:
- using TIterator = TIteratorBase<TListItem, T>;
- using TConstIterator = TIteratorBase<const TListItem, const T>;
+ using TIterator = TIteratorBase<TListItem, T>;
+ using TConstIterator = TIteratorBase<const TListItem, const T>;
- using iterator = TIterator;
- using const_iterator = TConstIterator;
+ using iterator = TIterator;
+ using const_iterator = TConstIterator;
public:
inline TIntrusiveSList() noexcept
diff --git a/util/generic/map_ut.cpp b/util/generic/map_ut.cpp
index 79e832b024..609a73ccde 100644
--- a/util/generic/map_ut.cpp
+++ b/util/generic/map_ut.cpp
@@ -139,7 +139,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
}
using mmap = TMultiMap<int, char, TLess<int>>;
- using pair_type = mmap::value_type;
+ using pair_type = mmap::value_type;
pair_type p1(3, 'c');
pair_type p2(6, 'f');
@@ -277,7 +277,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
Y_UNIT_TEST(TestTemplateMethods) {
{
using Container = TMap<TKey, int, TKeyCmp>;
- using value = Container::value_type;
+ using value = Container::value_type;
Container cont;
@@ -305,7 +305,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
{
using Container = TMap<TKey*, int, TKeyCmpPtr>;
- using value = Container::value_type;
+ using value = Container::value_type;
Container cont;
@@ -334,7 +334,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
{
using Container = TMultiMap<TKey, int, TKeyCmp>;
- using value = Container::value_type;
+ using value = Container::value_type;
Container cont;
@@ -362,7 +362,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
{
using Container = TMultiMap<TKey const volatile*, int, TKeyCmpPtr>;
- using value = Container::value_type;
+ using value = Container::value_type;
Container cont;
diff --git a/util/generic/noncopyable.h b/util/generic/noncopyable.h
index c007934133..ef5996fd39 100644
--- a/util/generic/noncopyable.h
+++ b/util/generic/noncopyable.h
@@ -34,5 +34,5 @@ namespace NNonCopyable { // protection from unintended ADL
};
}
-using TNonCopyable = NNonCopyable::TNonCopyable;
+using TNonCopyable = NNonCopyable::TNonCopyable;
using TMoveOnly = NNonCopyable::TMoveOnly;
diff --git a/util/generic/ptr.h b/util/generic/ptr.h
index 19db0e3ec5..27034af3c4 100644
--- a/util/generic/ptr.h
+++ b/util/generic/ptr.h
@@ -778,11 +778,11 @@ typename TSimpleIntrusiveOps<T, Ops>::TFunc TSimpleIntrusiveOps<T, Ops>::Ref_ =
template <class T, class Ops>
typename TSimpleIntrusiveOps<T, Ops>::TFunc TSimpleIntrusiveOps<T, Ops>::UnRef_ = nullptr;
-template <typename T, class Ops = TDefaultIntrusivePtrOps<T>, typename... Args>
+template <typename T, class Ops = TDefaultIntrusivePtrOps<T>, typename... Args>
[[nodiscard]] TIntrusivePtr<T, Ops> MakeIntrusive(Args&&... args) {
return new T{std::forward<Args>(args)...};
-}
-
+}
+
template <typename T, class Ops = TDefaultIntrusivePtrOps<T>, typename... Args>
[[nodiscard]] TIntrusiveConstPtr<T, Ops> MakeIntrusiveConst(Args&&... args) {
return new T{std::forward<Args>(args)...};
diff --git a/util/generic/ptr_ut.cpp b/util/generic/ptr_ut.cpp
index c2dcff23f6..85eaf125a9 100644
--- a/util/generic/ptr_ut.cpp
+++ b/util/generic/ptr_ut.cpp
@@ -26,7 +26,7 @@ class TPointerTest: public TTestBase {
UNIT_TEST(TestIntrusiveConvertion);
UNIT_TEST(TestIntrusiveConstConvertion);
UNIT_TEST(TestIntrusiveConstConstruction);
- UNIT_TEST(TestMakeIntrusive);
+ UNIT_TEST(TestMakeIntrusive);
UNIT_TEST(TestCopyOnWritePtr1);
UNIT_TEST(TestCopyOnWritePtr2);
UNIT_TEST(TestOperatorBool);
@@ -78,7 +78,7 @@ private:
void TestIntrusiveConvertion();
void TestIntrusiveConstConvertion();
void TestIntrusiveConstConstruction();
- void TestMakeIntrusive();
+ void TestMakeIntrusive();
void TestCopyOnWritePtr1();
void TestCopyOnWritePtr2();
void TestOperatorBool();
@@ -418,17 +418,17 @@ void TPointerTest::TestIntrusiveConstConvertion() {
}
void TPointerTest::TestMakeIntrusive() {
- {
- UNIT_ASSERT_VALUES_EQUAL(0, TOp::Cnt);
- auto p = MakeIntrusive<TOp>();
- UNIT_ASSERT_VALUES_EQUAL(1, p->RefCount());
- UNIT_ASSERT_VALUES_EQUAL(1, TOp::Cnt);
- }
+ {
+ UNIT_ASSERT_VALUES_EQUAL(0, TOp::Cnt);
+ auto p = MakeIntrusive<TOp>();
+ UNIT_ASSERT_VALUES_EQUAL(1, p->RefCount());
+ UNIT_ASSERT_VALUES_EQUAL(1, TOp::Cnt);
+ }
UNIT_ASSERT_VALUES_EQUAL(TOp::Cnt, 0);
-}
-
+}
+
void TPointerTest::TestCopyOnWritePtr1() {
- using TPtr = TCowPtr<TSimpleSharedPtr<int>>;
+ using TPtr = TCowPtr<TSimpleSharedPtr<int>>;
TPtr p1;
UNIT_ASSERT(!p1.Shared());
@@ -484,7 +484,7 @@ struct X: public TSimpleRefCount<X> {
};
void TPointerTest::TestCopyOnWritePtr2() {
- using TPtr = TCowPtr<TIntrusivePtr<X>>;
+ using TPtr = TCowPtr<TIntrusivePtr<X>>;
TPtr p1;
UNIT_ASSERT(!p1.Shared());
@@ -537,7 +537,7 @@ namespace {
char t[2];
};
- using RTNo = char;
+ using RTNo = char;
static RTYes Func(TTo);
static RTNo Func(...);
diff --git a/util/generic/refcount.h b/util/generic/refcount.h
index 966e853b77..5d3c7f92d3 100644
--- a/util/generic/refcount.h
+++ b/util/generic/refcount.h
@@ -81,13 +81,13 @@ private:
size_t ThreadId;
};
#else
-using TCheckPolicy = TNoCheckPolicy;
+using TCheckPolicy = TNoCheckPolicy;
#endif
// Use this one if access from multiple threads to your pointer is an error and you want to enforce thread checks
-using TSimpleCounter = TSimpleCounterTemplate<TCheckPolicy>;
+using TSimpleCounter = TSimpleCounterTemplate<TCheckPolicy>;
// Use this one if you do want to share the pointer between threads, omit thread checks and do the synchronization yourself
-using TExplicitSimpleCounter = TSimpleCounterTemplate<TNoCheckPolicy>;
+using TExplicitSimpleCounter = TSimpleCounterTemplate<TNoCheckPolicy>;
template <class TCounterCheckPolicy>
struct TCommonLockOps<TSimpleCounterTemplate<TCounterCheckPolicy>> {
diff --git a/util/generic/strbase.h b/util/generic/strbase.h
index ab39fc7537..988600b51a 100644
--- a/util/generic/strbase.h
+++ b/util/generic/strbase.h
@@ -40,15 +40,15 @@ class TStringBase {
using TStringViewWithTraits = std::basic_string_view<TCharType, TTraitsType>;
public:
- using TChar = TCharType;
- using TTraits = TTraitsType;
- using TSelf = TStringBase<TDerived, TChar, TTraits>;
+ using TChar = TCharType;
+ using TTraits = TTraitsType;
+ using TSelf = TStringBase<TDerived, TChar, TTraits>;
- using size_type = size_t;
+ using size_type = size_t;
using difference_type = ptrdiff_t;
static constexpr size_t npos = size_t(-1);
- using const_iterator = const TCharType*;
+ using const_iterator = const TCharType*;
using const_reference = const TCharType&;
template <typename TBase>
@@ -579,7 +579,7 @@ public:
}
private:
- using GenericFinder = const TCharType* (*)(const TCharType*, size_t, const TCharType*, size_t);
+ using GenericFinder = const TCharType* (*)(const TCharType*, size_t, const TCharType*, size_t);
TStringViewWithTraits AsStringView() const {
return static_cast<TStringViewWithTraits>(*this);
diff --git a/util/generic/strbuf.h b/util/generic/strbuf.h
index 70b9360d58..09319ca94b 100644
--- a/util/generic/strbuf.h
+++ b/util/generic/strbuf.h
@@ -19,7 +19,7 @@ private:
public:
using char_type = TCharType; // TODO: DROP
- using traits_type = TTraits;
+ using traits_type = TTraits;
//Resolving some ambiguity between TStringBase and std::basic_string_view
//for typenames
diff --git a/util/generic/string.h b/util/generic/string.h
index 8cd8aa6917..dcd24a240f 100644
--- a/util/generic/string.h
+++ b/util/generic/string.h
@@ -170,10 +170,10 @@ public:
using reference = TBasicCharRef<TBasicString>;
#endif
using char_type = TCharType; // TODO: DROP
- using value_type = TCharType;
- using traits_type = TTraits;
+ using value_type = TCharType;
+ using traits_type = TTraits;
- using iterator = TCharType*;
+ using iterator = TCharType*;
using reverse_iterator = typename TBase::template TReverseIteratorBase<iterator>;
using typename TBase::const_iterator;
using typename TBase::const_reference;
diff --git a/util/generic/typelist.h b/util/generic/typelist.h
index 5ce26ab97c..aad7231fed 100644
--- a/util/generic/typelist.h
+++ b/util/generic/typelist.h
@@ -95,8 +95,8 @@ namespace NTL {
using T2 = TTypeSelector<wchar_t, T1::TSignedInts, T1::TUnsignedInts>;
}
-using TSignedInts = NTL::T2::TSignedInts;
-using TUnsignedInts = NTL::T2::TUnsignedInts;
+using TSignedInts = NTL::T2::TSignedInts;
+using TUnsignedInts = NTL::T2::TUnsignedInts;
template <unsigned sizeOf>
struct TSizeOfPredicate {
diff --git a/util/generic/typelist_ut.cpp b/util/generic/typelist_ut.cpp
index eeabfa97b1..a55dd400b8 100644
--- a/util/generic/typelist_ut.cpp
+++ b/util/generic/typelist_ut.cpp
@@ -70,7 +70,7 @@ public:
UNIT_ASSERT_TYPES_EQUAL(TListType::TSelectBy<TAnyType>::type, TA);
UNIT_ASSERT_TYPES_EQUAL(TListType::TSelectBy<TIs1ArgTemplate>::type, TMyVector<TA>);
- using TMyMapPTATB = TMyMap<TA*, TB>;
+ using TMyMapPTATB = TMyMap<TA*, TB>;
UNIT_ASSERT_TYPES_EQUAL(TListType::TSelectBy<TIsNArgTemplate>::type, TMyMapPTATB);
}
diff --git a/util/generic/typetraits.h b/util/generic/typetraits.h
index d165bd1a06..13473ea544 100644
--- a/util/generic/typetraits.h
+++ b/util/generic/typetraits.h
@@ -97,7 +97,7 @@ namespace NPrivate {
template <class T>
class TTypeTraits: public TTypeTraitsBase<T> {
- using TBase = TTypeTraitsBase<T>;
+ using TBase = TTypeTraitsBase<T>;
/*
* can be effectively passed to function as value
diff --git a/util/generic/utility.h b/util/generic/utility.h
index 43b98eeafc..c1e9615833 100644
--- a/util/generic/utility.h
+++ b/util/generic/utility.h
@@ -110,7 +110,7 @@ struct TNullTmpl {
}
};
-using TNull = TNullTmpl<0>;
+using TNull = TNullTmpl<0>;
/*
* Class for zero-initialize padding bytes in derived classes
diff --git a/util/generic/vector.h b/util/generic/vector.h
index a5b258955a..2be484614e 100644
--- a/util/generic/vector.h
+++ b/util/generic/vector.h
@@ -13,7 +13,7 @@ class TVector: public std::vector<T, TReboundAllocator<A, T>> {
public:
using TBase = std::vector<T, TReboundAllocator<A, T>>;
using TSelf = TVector<T, A>;
- using size_type = typename TBase::size_type;
+ using size_type = typename TBase::size_type;
inline TVector()
: TBase()
diff --git a/util/generic/ylimits_ut.cpp b/util/generic/ylimits_ut.cpp
index f1b3c6858c..3b1007e7b9 100644
--- a/util/generic/ylimits_ut.cpp
+++ b/util/generic/ylimits_ut.cpp
@@ -113,33 +113,33 @@ static inline bool TestNan(const T&) {
void TLimitTest::TestLimits() {
UNIT_ASSERT(TestIntegralLimits(bool()));
UNIT_ASSERT(TestIntegralLimits(char()));
- using signed_char = signed char;
+ using signed_char = signed char;
UNIT_ASSERT(TestSignedIntegralLimits(signed_char()));
- using unsigned_char = unsigned char;
+ using unsigned_char = unsigned char;
UNIT_ASSERT(TestUnsignedIntegralLimits(unsigned_char()));
UNIT_ASSERT(TestSignedIntegralLimits(short()));
- using unsigned_short = unsigned short;
+ using unsigned_short = unsigned short;
UNIT_ASSERT(TestUnsignedIntegralLimits(unsigned_short()));
UNIT_ASSERT(TestSignedIntegralLimits(int()));
- using unsigned_int = unsigned int;
+ using unsigned_int = unsigned int;
UNIT_ASSERT(TestUnsignedIntegralLimits(unsigned_int()));
UNIT_ASSERT(TestSignedIntegralLimits(long()));
- using unsigned_long = unsigned long;
+ using unsigned_long = unsigned long;
UNIT_ASSERT(TestUnsignedIntegralLimits(unsigned_long()));
- using long_long = long long;
+ using long_long = long long;
UNIT_ASSERT(TestSignedIntegralLimits(long_long()));
- using unsigned_long_long = unsigned long long;
+ using unsigned_long_long = unsigned long long;
UNIT_ASSERT(TestUnsignedIntegralLimits(unsigned_long_long()));
UNIT_ASSERT(TestFloatLimits(float()));
UNIT_ASSERT(TestFloatLimits(double()));
- using long_double = long double;
+ using long_double = long double;
UNIT_ASSERT(RUNNING_ON_VALGRIND || TestFloatLimits(long_double()));
}
void TLimitTest::TestNan() {
UNIT_ASSERT(::TestNan(float()));
UNIT_ASSERT(::TestNan(double()));
- using long_double = long double;
+ using long_double = long double;
UNIT_ASSERT(::TestNan(long_double()));
}