aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/ptr.h
diff options
context:
space:
mode:
authorermolovd <ermolovd@yandex-team.ru>2022-02-10 16:47:53 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:53 +0300
commit2a4a975b112fa0fa138abc7457fe67e0e1e7fd02 (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /util/generic/ptr.h
parentb91bcef7c99a119b0846479ef71bfab4beec72ca (diff)
downloadydb-2a4a975b112fa0fa138abc7457fe67e0e1e7fd02.tar.gz
Restoring authorship annotation for <ermolovd@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/ptr.h')
-rw-r--r--util/generic/ptr.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/util/generic/ptr.h b/util/generic/ptr.h
index fa15f3a378..19db0e3ec5 100644
--- a/util/generic/ptr.h
+++ b/util/generic/ptr.h
@@ -4,7 +4,7 @@
#include "utility.h"
#include "intrlist.h"
#include "refcount.h"
-#include "typetraits.h"
+#include "typetraits.h"
#include "singleton.h"
#include <utility>
@@ -508,22 +508,22 @@ public:
Ref();
}
- // NOTE:
+ // NOTE:
// without std::enable_if_t compiler sometimes tries to use this constructor inappropriately
- // e.g.
- // struct A {};
- // struct B {};
- // void Func(TIntrusivePtr<A>);
- // void Func(TIntrusivePtr<B>);
- // ...
- // Func(TIntrusivePtr<A>(new A)); // <--- compiler can't decide which version of Func to use
+ // e.g.
+ // struct A {};
+ // struct B {};
+ // void Func(TIntrusivePtr<A>);
+ // void Func(TIntrusivePtr<B>);
+ // ...
+ // Func(TIntrusivePtr<A>(new A)); // <--- compiler can't decide which version of Func to use
template <class U, class = TGuardConversion<T, U>>
inline TIntrusivePtr(const TIntrusivePtr<U>& p) noexcept
- : T_(p.Get())
- {
- Ref();
- }
-
+ : T_(p.Get())
+ {
+ Ref();
+ }
+
template <class U, class = TGuardConversion<T, U>>
inline TIntrusivePtr(TIntrusivePtr<U>&& p) noexcept
: T_(p.T_)
@@ -645,11 +645,11 @@ public:
template <class U, class = TGuardConversion<T, U>>
inline TIntrusiveConstPtr(const TIntrusiveConstPtr<U>& p) noexcept
- : T_(p.T_)
- {
- Ref();
- }
-
+ : T_(p.T_)
+ {
+ Ref();
+ }
+
template <class U, class = TGuardConversion<T, U>>
inline TIntrusiveConstPtr(TIntrusiveConstPtr<U>&& p) noexcept
: T_(p.T_)
@@ -711,9 +711,9 @@ private:
private:
T* T_;
-
- template <class U, class O>
- friend class TIntrusiveConstPtr;
+
+ template <class U, class O>
+ friend class TIntrusiveConstPtr;
};
template <class T, class Ops>