Skip to content

Commit 0b57ea0

Browse files
committed
Fix constexpr annotations.
1 parent c23272c commit 0b57ea0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libcxx/include/__algorithm/iterator_operations.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ struct _IterOps<_ClassicAlgPolicy> {
9191
// it's unclear whether _Iter has a difference_type and whether that's signed, so we play it safe:
9292
// use the incoming type for returning and steer clear of negative overflows
9393
template <class _Iter, class _Distance>
94-
_LIBCPP_HIDE_FROM_ABI constexpr static _Distance advance(_Iter& __iter, _Distance __count, const _Iter& __sentinel) {
94+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static _Distance advance(_Iter& __iter, _Distance __count, const _Iter& __sentinel) {
9595
return _IterOps::__advance(__iter, __count, __sentinel, typename iterator_traits<_Iter>::iterator_category());
9696
}
9797

9898
// advance with sentinel, a la std::ranges::advance -- InputIterator specialization
9999
template <class _InputIter, class _Distance>
100-
_LIBCPP_HIDE_FROM_ABI constexpr static _Distance
100+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static _Distance
101101
__advance(_InputIter& __iter, _Distance __count, const _InputIter& __sentinel, input_iterator_tag) {
102102
_Distance __dist{};
103103
for (; __dist < __count && __iter != __sentinel; ++__dist)
@@ -107,7 +107,7 @@ struct _IterOps<_ClassicAlgPolicy> {
107107

108108
// advance with sentinel, a la std::ranges::advance -- BidirectionalIterator specialization
109109
template <class _BiDirIter, class _Distance>
110-
_LIBCPP_HIDE_FROM_ABI constexpr static _Distance
110+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static _Distance
111111
__advance(_BiDirIter& __iter, _Distance __count, const _BiDirIter& __sentinel, bidirectional_iterator_tag) {
112112
_Distance __dist{};
113113
if (__count >= 0)

0 commit comments

Comments
 (0)