5 #ifndef VCCC_ITERATOR_ITER_MOVE_HPP_
6 #define VCCC_ITERATOR_ITER_MOVE_HPP_
20 namespace detail_iter_move {
24 template<std::
size_t N>
25 using return_category = vccc::detail::return_category<N>;
32 struct has_adl : std::false_type {
33 using category = return_category<0>;
36 struct has_adl<T, true,
void_t<decltype(
iter_move(
std::declval<T>()))>> : std::true_type {
37 using category = return_category<1>;
41 struct deref_is : std::false_type {};
43 template<
typename I,
template<
typename,
typename...>
class Test>
44 struct deref_is<I, Test, true> : Test<decltype(*std::declval<I>())> {};
49 has_adl<T>::value, return_category<1>,
51 deref_is<T, std::is_lvalue_reference>::value, return_category<2>,
53 dereferenceable<T>::value, return_category<3>,
58 constexpr decltype(
auto) call(T&& t, return_category<1>)
const {
63 constexpr decltype(
auto) call(T&& t, return_category<2>)
const {
64 return std::move(*std::forward<T>(t));
68 constexpr decltype(
auto) call(T&& t, return_category<3>)
const {
69 return *std::forward<T>(t);
73 template<
typename T, std::enable_if_t<(category<T&&>::value > 0),
int> = 0>
74 constexpr decltype(
auto) operator()(T &&t)
const {
75 return this->call(std::forward<T>(t), category<T&&>{});
98 using namespace niebloid;
constexpr VCCC_INLINE_OR_STATIC detail_iter_move::iter_move_niebloid iter_move
Definition: iter_move.hpp:92
#define VCCC_INLINE_OR_STATIC
Definition: inline_or_static.hpp:9
Definition: matrix.hpp:495
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35
specifies that an object of a type can be dereferenced
Definition: dereferenceable.hpp:45
Definition: is_class_or_enum.hpp:20
Definition: iter_move.hpp:22