+2020-01-06 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
+ (lexicographical_compare_three_way): Do not depend on
+ __cpp_lib_concepts.
+ * include/std/version (__cpp_lib_three_way_comparison): Only define
+ when __cpp_lib_concepts is defined.
+ * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
+
2020-01-03 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_algobase.h (lexicographical_compare_three_way):
}
#if __cpp_lib_three_way_comparison
-#if __cpp_lib_concepts
// Iter points to a contiguous range of unsigned narrow character type
// or std::byte, suitable for comparison by memcmp.
template<typename _Iter>
return _Res{__y, __c};
return _Res{__x, __c};
}
-#endif
/**
* @brief Performs dictionary comparison on ranges.
__glibcxx_requires_valid_range(__first1, __last1);
__glibcxx_requires_valid_range(__first2, __last2);
-#if __cpp_lib_concepts && __cpp_lib_is_constant_evaluated
+#if __cpp_lib_is_constant_evaluated
using _Cat = decltype(__comp(*__first1, *__first2));
static_assert(same_as<common_comparison_category_t<_Cat>, _Cat>);
}
return __lencmp;
}
-#endif // concepts && is_constant_evaluated
+#endif // is_constant_evaluated
while (__first1 != __last1 && __first2 != __last2)
{
if (auto __cmp = __comp(*__first1, *__first2); __cmp != 0)
: __first2 != __last2 ? strong_ordering::less : strong_ordering::equal;
}
-#if __cpp_lib_concepts
template<typename _InputIter1, typename _InputIter2>
constexpr auto
lexicographical_compare_three_way(_InputIter1 __first1,
__first2, __last2,
compare_three_way{});
}
-#endif // concepts
#endif // three_way_comparison
template<typename _InputIterator1, typename _InputIterator2,
#define __cpp_lib_list_remove_return_type 201806L
#define __cpp_lib_math_constants 201907L
#define __cpp_lib_span 201902L
-#if __cpp_impl_three_way_comparison >= 201907L
+#if __cpp_impl_three_way_comparison >= 201907L && __cpp_lib_concepts
# define __cpp_lib_three_way_comparison 201711L
#endif
#define __cpp_lib_to_array 201907L