aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/maybe_traits.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/maybe_traits.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/maybe_traits.h')
-rw-r--r--util/generic/maybe_traits.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/util/generic/maybe_traits.h b/util/generic/maybe_traits.h
index c7f2fed3e7..9e9f56955e 100644
--- a/util/generic/maybe_traits.h
+++ b/util/generic/maybe_traits.h
@@ -10,16 +10,16 @@ namespace NMaybe {
template <class T, bool = std::is_trivially_destructible<T>::value>
struct TStorageBase {
constexpr TStorageBase() noexcept
- : NullState_('\0')
- {
- }
+ : NullState_('\0')
+ {
+ }
template <class... Args>
constexpr TStorageBase(TInPlace, Args&&... args)
: Data_(std::forward<Args>(args)...)
- , Defined_(true)
- {
- }
+ , Defined_(true)
+ {
+ }
~TStorageBase() = default;
@@ -33,16 +33,16 @@ namespace NMaybe {
template <class T>
struct TStorageBase<T, false> {
constexpr TStorageBase() noexcept
- : NullState_('\0')
- {
- }
+ : NullState_('\0')
+ {
+ }
template <class... Args>
constexpr TStorageBase(TInPlace, Args&&... args)
: Data_(std::forward<Args>(args)...)
- , Defined_(true)
- {
- }
+ , Defined_(true)
+ {
+ }
~TStorageBase() {
if (this->Defined_) {
@@ -60,12 +60,12 @@ namespace NMaybe {
// -------------------- COPY CONSTRUCT --------------------
template <class T, bool = std::is_trivially_copy_constructible<T>::value>
- struct TCopyBase: TStorageBase<T> {
+ struct TCopyBase: TStorageBase<T> {
using TStorageBase<T>::TStorageBase;
};
template <class T>
- struct TCopyBase<T, false>: TStorageBase<T> {
+ struct TCopyBase<T, false>: TStorageBase<T> {
using TStorageBase<T>::TStorageBase;
constexpr TCopyBase() = default;
@@ -83,12 +83,12 @@ namespace NMaybe {
// -------------------- MOVE CONSTRUCT --------------------
template <class T, bool = std::is_trivially_move_constructible<T>::value>
- struct TMoveBase: TCopyBase<T> {
+ struct TMoveBase: TCopyBase<T> {
using TCopyBase<T>::TCopyBase;
};
template <class T>
- struct TMoveBase<T, false>: TCopyBase<T> {
+ struct TMoveBase<T, false>: TCopyBase<T> {
using TCopyBase<T>::TCopyBase;
constexpr TMoveBase() noexcept = default;
@@ -106,12 +106,12 @@ namespace NMaybe {
// -------------------- COPY ASSIGN --------------------
template <class T, bool = std::is_trivially_copy_assignable<T>::value>
- struct TCopyAssignBase: TMoveBase<T> {
+ struct TCopyAssignBase: TMoveBase<T> {
using TMoveBase<T>::TMoveBase;
};
template <class T>
- struct TCopyAssignBase<T, false>: TMoveBase<T> {
+ struct TCopyAssignBase<T, false>: TMoveBase<T> {
using TMoveBase<T>::TMoveBase;
constexpr TCopyAssignBase() noexcept = default;
@@ -137,12 +137,12 @@ namespace NMaybe {
// -------------------- MOVE ASSIGN --------------------
template <class T, bool = std::is_trivially_copy_assignable<T>::value>
- struct TMoveAssignBase: TCopyAssignBase<T> {
+ struct TMoveAssignBase: TCopyAssignBase<T> {
using TCopyAssignBase<T>::TCopyAssignBase;
};
template <class T>
- struct TMoveAssignBase<T, false>: TCopyAssignBase<T> {
+ struct TMoveAssignBase<T, false>: TCopyAssignBase<T> {
using TCopyAssignBase<T>::TCopyAssignBase;
constexpr TMoveAssignBase() noexcept = default;
@@ -150,8 +150,8 @@ namespace NMaybe {
constexpr TMoveAssignBase(TMoveAssignBase&&) = default;
TMoveAssignBase& operator=(const TMoveAssignBase&) = default;
TMoveAssignBase& operator=(TMoveAssignBase&& rhs) noexcept(
- std::is_nothrow_move_assignable<T>::value&&
- std::is_nothrow_move_constructible<T>::value)
+ std::is_nothrow_move_assignable<T>::value&&
+ std::is_nothrow_move_constructible<T>::value)
{
if (this->Defined_) {
if (rhs.Defined_) {