aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/__iterator/iter_move.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/__iterator/iter_move.h')
-rw-r--r--libcxx/include/__iterator/iter_move.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/libcxx/include/__iterator/iter_move.h b/libcxx/include/__iterator/iter_move.h
index d8240ab9c2f1..a7d9413fb84b 100644
--- a/libcxx/include/__iterator/iter_move.h
+++ b/libcxx/include/__iterator/iter_move.h
@@ -13,9 +13,11 @@
#include <__concepts/class_or_enum.h>
#include <__config>
#include <__iterator/iterator_traits.h>
+#include <__type_traits/is_reference.h>
+#include <__type_traits/remove_cvref.h>
+#include <__utility/declval.h>
#include <__utility/forward.h>
#include <__utility/move.h>
-#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -36,6 +38,7 @@ template <class _Tp>
concept __unqualified_iter_move =
__class_or_enum<remove_cvref_t<_Tp>> &&
requires (_Tp&& __t) {
+ // NOLINTNEXTLINE(libcpp-robust-against-adl) iter_swap ADL calls should only be made through ranges::iter_swap
iter_move(std::forward<_Tp>(__t));
};
@@ -59,6 +62,7 @@ concept __just_deref =
// [iterator.cust.move]
struct __fn {
+ // NOLINTBEGIN(libcpp-robust-against-adl) iter_move ADL calls should only be made through ranges::iter_move
template<class _Ip>
requires __unqualified_iter_move<_Ip>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator()(_Ip&& __i) const
@@ -66,6 +70,7 @@ struct __fn {
{
return iter_move(std::forward<_Ip>(__i));
}
+ // NOLINTEND(libcpp-robust-against-adl)
template<class _Ip>
requires __move_deref<_Ip>
@@ -90,7 +95,7 @@ inline namespace __cpo {
template<__dereferenceable _Tp>
requires requires(_Tp& __t) { { ranges::iter_move(__t) } -> __can_reference; }
-using iter_rvalue_reference_t = decltype(ranges::iter_move(declval<_Tp&>()));
+using iter_rvalue_reference_t = decltype(ranges::iter_move(std::declval<_Tp&>()));
#endif // _LIBCPP_STD_VER > 17