aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/containers/flat_hash/lib/concepts
diff options
context:
space:
mode:
authortender-bum <tender-bum@yandex-team.ru>2022-02-10 16:50:01 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:01 +0300
commit4aef354b224559d2b031487a10d4f5cc6e82e95a (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/containers/flat_hash/lib/concepts
parentc78b06a63de7beec995c1007bc5332bdf3d75b69 (diff)
downloadydb-4aef354b224559d2b031487a10d4f5cc6e82e95a.tar.gz
Restoring authorship annotation for <tender-bum@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/containers/flat_hash/lib/concepts')
-rw-r--r--library/cpp/containers/flat_hash/lib/concepts/concepts.cpp8
-rw-r--r--library/cpp/containers/flat_hash/lib/concepts/container.h132
-rw-r--r--library/cpp/containers/flat_hash/lib/concepts/iterator.h40
-rw-r--r--library/cpp/containers/flat_hash/lib/concepts/size_fitter.h68
-rw-r--r--library/cpp/containers/flat_hash/lib/concepts/value_marker.h68
-rw-r--r--library/cpp/containers/flat_hash/lib/concepts/ya.make18
6 files changed, 167 insertions, 167 deletions
diff --git a/library/cpp/containers/flat_hash/lib/concepts/concepts.cpp b/library/cpp/containers/flat_hash/lib/concepts/concepts.cpp
index 8e538fbd3d..63eed9acdd 100644
--- a/library/cpp/containers/flat_hash/lib/concepts/concepts.cpp
+++ b/library/cpp/containers/flat_hash/lib/concepts/concepts.cpp
@@ -1,4 +1,4 @@
-#include "container.h"
-#include "iterator.h"
-#include "size_fitter.h"
-#include "value_marker.h"
+#include "container.h"
+#include "iterator.h"
+#include "size_fitter.h"
+#include "value_marker.h"
diff --git a/library/cpp/containers/flat_hash/lib/concepts/container.h b/library/cpp/containers/flat_hash/lib/concepts/container.h
index 586b21feba..eac1803b59 100644
--- a/library/cpp/containers/flat_hash/lib/concepts/container.h
+++ b/library/cpp/containers/flat_hash/lib/concepts/container.h
@@ -1,66 +1,66 @@
-#pragma once
-
-#include <type_traits>
-
-/* Concepts:
- * Container
- * RemovalContainer
- */
-namespace NFlatHash::NConcepts {
-
-#define DCV(type) std::declval<type>()
-#define DCT(object) decltype(object)
-
-template <class T, class = void>
-struct Container : std::false_type {};
-
-template <class T>
-struct Container<T, std::void_t<
- typename T::value_type,
- typename T::size_type,
- typename T::difference_type,
- DCT(DCV(T).Node(DCV(typename T::size_type))),
- DCT(DCV(const T).Node(DCV(typename T::size_type))),
- DCT(DCV(const T).Size()),
- DCT(DCV(const T).Taken()),
- DCT(DCV(const T).Empty()),
- DCT(DCV(const T).IsEmpty(DCV(typename T::size_type))),
- DCT(DCV(const T).IsTaken(DCV(typename T::size_type))),
- DCT(DCV(T).Swap(DCV(T&))),
- DCT(DCV(const T).Clone(DCV(typename T::size_type)))>>
- : std::conjunction<std::is_same<DCT(DCV(T).Node(DCV(typename T::size_type))),
- typename T::value_type&>,
- std::is_same<DCT(DCV(const T).Node(DCV(typename T::size_type))),
- const typename T::value_type&>,
- std::is_same<DCT(DCV(const T).Size()), typename T::size_type>,
- std::is_same<DCT(DCV(const T).Taken()), typename T::size_type>,
- std::is_same<DCT(DCV(const T).Empty()), typename T::size_type>,
- std::is_same<DCT(DCV(const T).IsEmpty(DCV(typename T::size_type))), bool>,
- std::is_same<DCT(DCV(const T).IsTaken(DCV(typename T::size_type))), bool>,
- std::is_same<DCT(DCV(const T).Clone(DCV(typename T::size_type))), T>,
- std::is_copy_constructible<T>,
- std::is_move_constructible<T>,
- std::is_copy_assignable<T>,
- std::is_move_assignable<T>> {};
-
-template <class T>
-constexpr bool ContainerV = Container<T>::value;
-
-template <class T, class = void>
-struct RemovalContainer : std::false_type {};
-
-template <class T>
-struct RemovalContainer<T, std::void_t<
- DCT(DCV(T).DeleteNode(DCV(typename T::size_type))),
- DCT(DCV(const T).IsDeleted(DCV(typename T::size_type)))>>
- : std::conjunction<Container<T>,
- std::is_same<DCT(DCV(const T).IsDeleted(DCV(typename T::size_type))),
- bool>> {};
-
-template <class T>
-constexpr bool RemovalContainerV = RemovalContainer<T>::value;
-
-#undef DCV
-#undef DCT
-
-} // namespace NFlatHash::NConcepts
+#pragma once
+
+#include <type_traits>
+
+/* Concepts:
+ * Container
+ * RemovalContainer
+ */
+namespace NFlatHash::NConcepts {
+
+#define DCV(type) std::declval<type>()
+#define DCT(object) decltype(object)
+
+template <class T, class = void>
+struct Container : std::false_type {};
+
+template <class T>
+struct Container<T, std::void_t<
+ typename T::value_type,
+ typename T::size_type,
+ typename T::difference_type,
+ DCT(DCV(T).Node(DCV(typename T::size_type))),
+ DCT(DCV(const T).Node(DCV(typename T::size_type))),
+ DCT(DCV(const T).Size()),
+ DCT(DCV(const T).Taken()),
+ DCT(DCV(const T).Empty()),
+ DCT(DCV(const T).IsEmpty(DCV(typename T::size_type))),
+ DCT(DCV(const T).IsTaken(DCV(typename T::size_type))),
+ DCT(DCV(T).Swap(DCV(T&))),
+ DCT(DCV(const T).Clone(DCV(typename T::size_type)))>>
+ : std::conjunction<std::is_same<DCT(DCV(T).Node(DCV(typename T::size_type))),
+ typename T::value_type&>,
+ std::is_same<DCT(DCV(const T).Node(DCV(typename T::size_type))),
+ const typename T::value_type&>,
+ std::is_same<DCT(DCV(const T).Size()), typename T::size_type>,
+ std::is_same<DCT(DCV(const T).Taken()), typename T::size_type>,
+ std::is_same<DCT(DCV(const T).Empty()), typename T::size_type>,
+ std::is_same<DCT(DCV(const T).IsEmpty(DCV(typename T::size_type))), bool>,
+ std::is_same<DCT(DCV(const T).IsTaken(DCV(typename T::size_type))), bool>,
+ std::is_same<DCT(DCV(const T).Clone(DCV(typename T::size_type))), T>,
+ std::is_copy_constructible<T>,
+ std::is_move_constructible<T>,
+ std::is_copy_assignable<T>,
+ std::is_move_assignable<T>> {};
+
+template <class T>
+constexpr bool ContainerV = Container<T>::value;
+
+template <class T, class = void>
+struct RemovalContainer : std::false_type {};
+
+template <class T>
+struct RemovalContainer<T, std::void_t<
+ DCT(DCV(T).DeleteNode(DCV(typename T::size_type))),
+ DCT(DCV(const T).IsDeleted(DCV(typename T::size_type)))>>
+ : std::conjunction<Container<T>,
+ std::is_same<DCT(DCV(const T).IsDeleted(DCV(typename T::size_type))),
+ bool>> {};
+
+template <class T>
+constexpr bool RemovalContainerV = RemovalContainer<T>::value;
+
+#undef DCV
+#undef DCT
+
+} // namespace NFlatHash::NConcepts
diff --git a/library/cpp/containers/flat_hash/lib/concepts/iterator.h b/library/cpp/containers/flat_hash/lib/concepts/iterator.h
index 62822ed211..b9c1c24c82 100644
--- a/library/cpp/containers/flat_hash/lib/concepts/iterator.h
+++ b/library/cpp/containers/flat_hash/lib/concepts/iterator.h
@@ -1,20 +1,20 @@
-#pragma once
-
-#include <iterator>
-
-/* Concepts:
- * Iterator
- */
-namespace NFlatHash::NConcepts {
-
-template <class T, class = void>
-struct Iterator : std::false_type {};
-
-template <class T>
-struct Iterator<T, std::void_t<typename std::iterator_traits<T>::iterator_category>>
- : std::true_type {};
-
-template <class T>
-constexpr bool IteratorV = Iterator<T>::value;
-
-} // namespace NFlatHash::NConcepts
+#pragma once
+
+#include <iterator>
+
+/* Concepts:
+ * Iterator
+ */
+namespace NFlatHash::NConcepts {
+
+template <class T, class = void>
+struct Iterator : std::false_type {};
+
+template <class T>
+struct Iterator<T, std::void_t<typename std::iterator_traits<T>::iterator_category>>
+ : std::true_type {};
+
+template <class T>
+constexpr bool IteratorV = Iterator<T>::value;
+
+} // namespace NFlatHash::NConcepts
diff --git a/library/cpp/containers/flat_hash/lib/concepts/size_fitter.h b/library/cpp/containers/flat_hash/lib/concepts/size_fitter.h
index 21526c3756..83d1d31304 100644
--- a/library/cpp/containers/flat_hash/lib/concepts/size_fitter.h
+++ b/library/cpp/containers/flat_hash/lib/concepts/size_fitter.h
@@ -1,34 +1,34 @@
-#pragma once
-
-#include <type_traits>
-
-/* Concepts:
- * SizeFitter
- */
-namespace NFlatHash::NConcepts {
-
-#define DCV(type) std::declval<type>()
-#define DCT(object) decltype(object)
-
-template <class T, class = void>
-struct SizeFitter : std::false_type {};
-
-template <class T>
-struct SizeFitter<T, std::void_t<
- DCT(DCV(const T).EvalIndex(DCV(size_t), DCV(size_t))),
- DCT(DCV(const T).EvalSize(DCV(size_t))),
- DCT(DCV(T).Update(DCV(size_t)))>>
- : std::conjunction<std::is_same<DCT(DCV(const T).EvalIndex(DCV(size_t), DCV(size_t))), size_t>,
- std::is_same<DCT(DCV(const T).EvalSize(DCV(size_t))), size_t>,
- std::is_copy_constructible<T>,
- std::is_move_constructible<T>,
- std::is_copy_assignable<T>,
- std::is_move_assignable<T>> {};
-
-template <class T>
-constexpr bool SizeFitterV = SizeFitter<T>::value;
-
-#undef DCV
-#undef DCT
-
-} // namespace NFlatHash::NConcepts
+#pragma once
+
+#include <type_traits>
+
+/* Concepts:
+ * SizeFitter
+ */
+namespace NFlatHash::NConcepts {
+
+#define DCV(type) std::declval<type>()
+#define DCT(object) decltype(object)
+
+template <class T, class = void>
+struct SizeFitter : std::false_type {};
+
+template <class T>
+struct SizeFitter<T, std::void_t<
+ DCT(DCV(const T).EvalIndex(DCV(size_t), DCV(size_t))),
+ DCT(DCV(const T).EvalSize(DCV(size_t))),
+ DCT(DCV(T).Update(DCV(size_t)))>>
+ : std::conjunction<std::is_same<DCT(DCV(const T).EvalIndex(DCV(size_t), DCV(size_t))), size_t>,
+ std::is_same<DCT(DCV(const T).EvalSize(DCV(size_t))), size_t>,
+ std::is_copy_constructible<T>,
+ std::is_move_constructible<T>,
+ std::is_copy_assignable<T>,
+ std::is_move_assignable<T>> {};
+
+template <class T>
+constexpr bool SizeFitterV = SizeFitter<T>::value;
+
+#undef DCV
+#undef DCT
+
+} // namespace NFlatHash::NConcepts
diff --git a/library/cpp/containers/flat_hash/lib/concepts/value_marker.h b/library/cpp/containers/flat_hash/lib/concepts/value_marker.h
index 9e444fa6cc..9d1e9b210a 100644
--- a/library/cpp/containers/flat_hash/lib/concepts/value_marker.h
+++ b/library/cpp/containers/flat_hash/lib/concepts/value_marker.h
@@ -1,34 +1,34 @@
-#pragma once
-
-#include <type_traits>
-
-/* Concepts:
- * ValueMarker
- */
-namespace NFlatHash::NConcepts {
-
-#define DCV(type) std::declval<type>()
-#define DCT(object) decltype(object)
-
-template <class T, class = void>
-struct ValueMarker : std::false_type {};
-
-template <class T>
-struct ValueMarker<T, std::void_t<
- typename T::value_type,
- DCT(DCV(const T).Create()),
- DCT(DCV(const T).Equals(DCV(const typename T::value_type&)))>>
- : std::conjunction<std::is_constructible<typename T::value_type, DCT(DCV(const T).Create())>,
- std::is_same<DCT(DCV(const T).Equals(DCV(const typename T::value_type&))), bool>,
- std::is_copy_constructible<T>,
- std::is_move_constructible<T>,
- std::is_copy_assignable<T>,
- std::is_move_assignable<T>> {};
-
-template <class T>
-constexpr bool ValueMarkerV = ValueMarker<T>::value;
-
-#undef DCV
-#undef DCT
-
-} // namespace NFlatHash::NConcepts
+#pragma once
+
+#include <type_traits>
+
+/* Concepts:
+ * ValueMarker
+ */
+namespace NFlatHash::NConcepts {
+
+#define DCV(type) std::declval<type>()
+#define DCT(object) decltype(object)
+
+template <class T, class = void>
+struct ValueMarker : std::false_type {};
+
+template <class T>
+struct ValueMarker<T, std::void_t<
+ typename T::value_type,
+ DCT(DCV(const T).Create()),
+ DCT(DCV(const T).Equals(DCV(const typename T::value_type&)))>>
+ : std::conjunction<std::is_constructible<typename T::value_type, DCT(DCV(const T).Create())>,
+ std::is_same<DCT(DCV(const T).Equals(DCV(const typename T::value_type&))), bool>,
+ std::is_copy_constructible<T>,
+ std::is_move_constructible<T>,
+ std::is_copy_assignable<T>,
+ std::is_move_assignable<T>> {};
+
+template <class T>
+constexpr bool ValueMarkerV = ValueMarker<T>::value;
+
+#undef DCV
+#undef DCT
+
+} // namespace NFlatHash::NConcepts
diff --git a/library/cpp/containers/flat_hash/lib/concepts/ya.make b/library/cpp/containers/flat_hash/lib/concepts/ya.make
index b564f210bd..f82fc1d51c 100644
--- a/library/cpp/containers/flat_hash/lib/concepts/ya.make
+++ b/library/cpp/containers/flat_hash/lib/concepts/ya.make
@@ -1,9 +1,9 @@
-LIBRARY()
-
-OWNER(tender-bum)
-
-SRCS(
- concepts.cpp
-)
-
-END()
+LIBRARY()
+
+OWNER(tender-bum)
+
+SRCS(
+ concepts.cpp
+)
+
+END()