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
commit47c1310af4978d726db4670c6828c59fadb89c1b (patch)
treea9642abe74ef10ddf159eec792f844ddfa39f130 /util
parentb93b3eb857a34bc32cef3c1b0c709e8365253b34 (diff)
downloadydb-47c1310af4978d726db4670c6828c59fadb89c1b.tar.gz
Restoring authorship annotation for <khodyrev@yandex-team.ru>. Commit 1 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 d165bd1a06..6b8dcfb12c 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
-template <bool B>
-using TBoolConstant = std::bool_constant<B>;
-#else
+#if _LIBCPP_STD_VER >= 17
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
-template <class B>
-using TNegation = std::negation<B>;
-#else
+#if _LIBCPP_STD_VER >= 17
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 {