Skip to content

Commit 6b57b90

Browse files
committed
constexpr fix
1 parent 01bfe42 commit 6b57b90

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libcxx/include/__flat_map/key_value_iterator.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ struct __product_iterator_traits<__key_value_iterator<_Owner, _KeyContainer, _Ma
191191
static constexpr size_t __size = 2;
192192

193193
template <size_t _Nth, class _Iter>
194-
_LIBCPP_HIDE_FROM_ABI static decltype(auto) __get_iterator_element(_Iter&& __it)
194+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static decltype(auto) __get_iterator_element(_Iter&& __it)
195195
requires(_Nth <= 1)
196196
{
197197
if constexpr (_Nth == 0) {
@@ -202,7 +202,8 @@ struct __product_iterator_traits<__key_value_iterator<_Owner, _KeyContainer, _Ma
202202
}
203203

204204
template <class _KeyIter, class _MappedIter>
205-
_LIBCPP_HIDE_FROM_ABI static auto __make_product_iterator(_KeyIter&& __key_iter, _MappedIter&& __mapped_iter) {
205+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto
206+
__make_product_iterator(_KeyIter&& __key_iter, _MappedIter&& __mapped_iter) {
206207
return __key_value_iterator<_Owner, _KeyContainer, _MappedContainer, _Const>(
207208
std::forward<_KeyIter>(__key_iter), std::forward<_MappedIter>(__mapped_iter));
208209
}

0 commit comments

Comments
 (0)