aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic
diff options
context:
space:
mode:
authorevelkin <evelkin@yandex-team.ru>2022-02-10 16:49:25 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:25 +0300
commit7510cec1516d17cbc8d7749974e36aa45f547a26 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/generic
parentf9f914a9d510572fa0d68959aaea41be5839ff3d (diff)
downloadydb-7510cec1516d17cbc8d7749974e36aa45f547a26.tar.gz
Restoring authorship annotation for <evelkin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic')
-rw-r--r--util/generic/function.h32
-rw-r--r--util/generic/typetraits.h12
2 files changed, 22 insertions, 22 deletions
diff --git a/util/generic/function.h b/util/generic/function.h
index 8a0efde4b1..62fa84e0cb 100644
--- a/util/generic/function.h
+++ b/util/generic/function.h
@@ -82,22 +82,22 @@ struct TFunctionArgImpl {
template <typename C, size_t N>
using TFunctionArg = typename TFunctionArgImpl<C, N>::TResult;
-
-// temporary before std::apply appearance
-
-template <typename F, typename Tuple, size_t... I>
-auto ApplyImpl(F&& f, Tuple&& t, std::index_sequence<I...>) {
- return f(std::get<I>(std::forward<Tuple>(t))...);
-}
-
-// change to std::apply after c++ 17
-template <typename F, typename Tuple>
+
+// temporary before std::apply appearance
+
+template <typename F, typename Tuple, size_t... I>
+auto ApplyImpl(F&& f, Tuple&& t, std::index_sequence<I...>) {
+ return f(std::get<I>(std::forward<Tuple>(t))...);
+}
+
+// change to std::apply after c++ 17
+template <typename F, typename Tuple>
auto Apply(F&& f, Tuple&& t) {
return ApplyImpl(f, t, std::make_index_sequence<std::tuple_size<std::decay_t<Tuple>>::value>{});
-}
-
-// change to std::apply after c++ 17
-template <typename F>
+}
+
+// change to std::apply after c++ 17
+template <typename F>
auto Apply(F&& f, std::tuple<>) {
- return f();
-}
+ return f();
+}
diff --git a/util/generic/typetraits.h b/util/generic/typetraits.h
index 8a47789547..d165bd1a06 100644
--- a/util/generic/typetraits.h
+++ b/util/generic/typetraits.h
@@ -238,27 +238,27 @@ struct TPodTraits<std::pair<T1, T2>> {
template <class T>
struct TIsPointerToConstMemberFunction: std::false_type {
};
-
+
template <class R, class T, class... Args>
struct TIsPointerToConstMemberFunction<R (T::*)(Args...) const>: std::true_type {
};
-
+
template <class R, class T, class... Args>
struct TIsPointerToConstMemberFunction<R (T::*)(Args...) const&>: std::true_type {
};
-
+
template <class R, class T, class... Args>
struct TIsPointerToConstMemberFunction<R (T::*)(Args...) const&&>: std::true_type {
};
-
+
template <class R, class T, class... Args>
struct TIsPointerToConstMemberFunction<R (T::*)(Args..., ...) const>: std::true_type {
};
-
+
template <class R, class T, class... Args>
struct TIsPointerToConstMemberFunction<R (T::*)(Args..., ...) const&>: std::true_type {
};
-
+
template <class R, class T, class... Args>
struct TIsPointerToConstMemberFunction<R (T::*)(Args..., ...) const&&>: std::true_type {
};