aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/ptr.h
diff options
context:
space:
mode:
authorishfb <ishfb@yandex-team.ru>2022-02-10 16:48:07 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:07 +0300
commit0170772a2dbf133f32e17ca137ff64790d43831f (patch)
tree68ce3ab477bcb9e09abf2b0a6e7b34287c53f0df /util/generic/ptr.h
parentdf6128370874866447314ec18d8e67fc7bde40b4 (diff)
downloadydb-0170772a2dbf133f32e17ca137ff64790d43831f.tar.gz
Restoring authorship annotation for <ishfb@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic/ptr.h')
-rw-r--r--util/generic/ptr.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/util/generic/ptr.h b/util/generic/ptr.h
index 19db0e3ec5..2f2d9ec08f 100644
--- a/util/generic/ptr.h
+++ b/util/generic/ptr.h
@@ -262,13 +262,13 @@ public:
: T_(that.Release())
{
}
-
+
template <class U, class = TGuardConversion<T, U>>
inline THolder(THolder<U, D>&& that) noexcept
: T_(that.Release())
{
}
-
+
THolder(const THolder&) = delete;
THolder& operator=(const THolder&) = delete;
@@ -320,13 +320,13 @@ public:
this->Reset(that.Release());
return *this;
}
-
+
template <class U>
THolder& operator=(THolder<U, D>&& that) noexcept {
this->Reset(that.Release());
return *this;
}
-
+
#ifdef __cpp_impl_three_way_comparison
template <class Other>
inline bool operator==(const Other& p) const noexcept {
@@ -347,8 +347,8 @@ private:
template <typename T, typename... Args>
[[nodiscard]] THolder<T> MakeHolder(Args&&... args) {
return THolder<T>(new T(std::forward<Args>(args)...));
-}
-
+}
+
/*
* usage:
* class T: public TRefCounted<T>
@@ -950,18 +950,18 @@ using TSimpleSharedPtr = TSharedPtr<T, TSimpleCounter, D>;
template <typename T, typename C, typename... Args>
[[nodiscard]] TSharedPtr<T, C> MakeShared(Args&&... args) {
return new T{std::forward<Args>(args)...};
-}
-
+}
+
template <typename T, typename... Args>
[[nodiscard]] inline TAtomicSharedPtr<T> MakeAtomicShared(Args&&... args) {
return MakeShared<T, TAtomicCounter>(std::forward<Args>(args)...);
-}
-
+}
+
template <typename T, typename... Args>
[[nodiscard]] inline TSimpleSharedPtr<T> MakeSimpleShared(Args&&... args) {
return MakeShared<T, TSimpleCounter>(std::forward<Args>(args)...);
-}
-
+}
+
class TCopyClone {
public:
template <class T>