diff options
author | Nikolas Klauser <nikolasklauser@berlin.de> | 2022-08-19 13:08:01 +0200 |
---|---|---|
committer | Nikolas Klauser <nikolasklauser@berlin.de> | 2022-08-19 15:35:02 +0200 |
commit | 5146b57b403b3a512dc64e766695b13803ef3b54 (patch) | |
tree | 695cfaecb0435e39c9171e56d3fe49a067b29344 /libcxx/include/__algorithm/iterator_operations.h | |
parent | ac31781759889226711b801c3833fea280fdb7aa (diff) | |
download | llvm-5146b57b403b3a512dc64e766695b13803ef3b54.tar.gz |
[libc++][NFC] Rename the constexpr macros
This was discussed on Discord with the consensus that we should rename the macros.
Reviewed By: ldionne, Mordante, var-const, avogelsgesang, jloser, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D131498
Diffstat (limited to 'libcxx/include/__algorithm/iterator_operations.h')
-rw-r--r-- | libcxx/include/__algorithm/iterator_operations.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libcxx/include/__algorithm/iterator_operations.h b/libcxx/include/__algorithm/iterator_operations.h index e215d70d53d1..c9ec66b49f42 100644 --- a/libcxx/include/__algorithm/iterator_operations.h +++ b/libcxx/include/__algorithm/iterator_operations.h @@ -76,14 +76,14 @@ struct _IterOps<_ClassicAlgPolicy> { // advance template <class _Iter, class _Distance> - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static void advance(_Iter& __iter, _Distance __count) { std::advance(__iter, __count); } // distance template <class _Iter> - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static typename iterator_traits<_Iter>::difference_type distance(_Iter __first, _Iter __last) { return std::distance(__first, __last); } @@ -95,7 +95,7 @@ struct _IterOps<_ClassicAlgPolicy> { using __move_t = decltype(std::move(*std::declval<_Iter&>())); template <class _Iter> - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static void __validate_iter_reference() { static_assert(is_same<__deref_t<_Iter>, typename iterator_traits<__uncvref_t<_Iter> >::reference>::value, "It looks like your iterator's `iterator_traits<It>::reference` does not match the return type of " @@ -105,7 +105,7 @@ struct _IterOps<_ClassicAlgPolicy> { // iter_move template <class _Iter> - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 static + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static // If the result of dereferencing `_Iter` is a reference type, deduce the result of calling `std::move` on it. Note // that the C++03 mode doesn't support `decltype(auto)` as the return type. __enable_if_t< @@ -118,7 +118,7 @@ struct _IterOps<_ClassicAlgPolicy> { } template <class _Iter> - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 static + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static // If the result of dereferencing `_Iter` is a value type, deduce the return value of this function to also be a // value -- otherwise, after `operator*` returns a temporary, this function would return a dangling reference to that // temporary. Note that the C++03 mode doesn't support `auto` as the return type. @@ -133,20 +133,20 @@ struct _IterOps<_ClassicAlgPolicy> { // iter_swap template <class _Iter1, class _Iter2> - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static void iter_swap(_Iter1&& __a, _Iter2&& __b) { std::iter_swap(std::forward<_Iter1>(__a), std::forward<_Iter2>(__b)); } // next template <class _Iterator> - _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_AFTER_CXX11 + _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator next(_Iterator, _Iterator __last) { return __last; } template <class _Iter> - _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_AFTER_CXX11 + _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14 __uncvref_t<_Iter> next(_Iter&& __it, typename iterator_traits<__uncvref_t<_Iter> >::difference_type __n = 1) { return std::next(std::forward<_Iter>(__it), __n); @@ -154,14 +154,14 @@ struct _IterOps<_ClassicAlgPolicy> { // prev template <class _Iter> - _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_AFTER_CXX11 + _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14 __uncvref_t<_Iter> prev(_Iter&& __iter, typename iterator_traits<__uncvref_t<_Iter> >::difference_type __n = 1) { return std::prev(std::forward<_Iter>(__iter), __n); } template <class _Iter> - _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_AFTER_CXX11 + _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14 void __advance_to(_Iter& __first, _Iter __last) { __first = __last; } |