aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorkhodyrev <khodyrev@yandex-team.ru>2022-02-10 16:49:29 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:29 +0300
commit4d75b7f76712a8150bd526a7ef43d279d9892eb7 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util
parent47c1310af4978d726db4670c6828c59fadb89c1b (diff)
downloadydb-4d75b7f76712a8150bd526a7ef43d279d9892eb7.tar.gz
Restoring authorship annotation for <khodyrev@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util')
-rw-r--r--util/generic/typetraits.h46
1 files changed, 23 insertions, 23 deletions
diff --git a/util/generic/typetraits.h b/util/generic/typetraits.h
index 6b8dcfb12c..d165bd1a06 100644
--- a/util/generic/typetraits.h
+++ b/util/generic/typetraits.h
@@ -8,21 +8,21 @@
#include <type_traits>
#include <stlfwd>
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCPP_STD_VER >= 17
+template <bool B>
+using TBoolConstant = std::bool_constant<B>;
+#else
template <bool B>
-using TBoolConstant = std::bool_constant<B>;
-#else
-template <bool B>
struct TBoolConstant: std::integral_constant<bool, B> {};
-#endif
+#endif
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCPP_STD_VER >= 17
+template <class B>
+using TNegation = std::negation<B>;
+#else
template <class B>
-using TNegation = std::negation<B>;
-#else
-template <class B>
struct TNegation: ::TBoolConstant<!bool(B::value)> {};
-#endif
+#endif
namespace NPrivate {
template <class... Bs>
@@ -51,30 +51,30 @@ namespace NPrivate {
#if _LIBCPP_STD_VER >= 17 && !defined(_MSC_VER)
// Disable std::conjunction for MSVC by analogy with std::disjunction.
template <class... Bs>
-using TConjunction = std::conjunction<Bs...>;
-#else
-template <class... Bs>
+using TConjunction = std::conjunction<Bs...>;
+#else
+template <class... Bs>
struct TConjunction: ::TBoolConstant<::NPrivate::ConjunctionImpl<Bs...>()> {};
-#endif
+#endif
#if _LIBCPP_STD_VER >= 17 && !defined(_MSC_VER)
// Disable std::disjunction for MSVC.
// It reduces build time (500 -> 20 seconds) and memory consumption (20 GB -> less than 1 GB)
// for some files (notably search/dssm_boosting/dssm_boosting_calcer.cpp).
template <class... Bs>
-using TDisjunction = std::disjunction<Bs...>;
-#else
-template <class... Bs>
+using TDisjunction = std::disjunction<Bs...>;
+#else
+template <class... Bs>
struct TDisjunction: ::TBoolConstant<::NPrivate::DisjunctionImpl<Bs...>()> {};
-#endif
+#endif
-#if _LIBCPP_STD_VER >= 17
-template <class... Bs>
-using TVoidT = std::void_t<Bs...>;
-#else
+#if _LIBCPP_STD_VER >= 17
+template <class... Bs>
+using TVoidT = std::void_t<Bs...>;
+#else
template <class...>
using TVoidT = void;
-#endif
+#endif
template <class T>
struct TPodTraits {