@@ -1271,18 +1271,21 @@ _GLIBCXX_END_NAMESPACE_CONTAINER
_GLIBCXX_STD_C::_Deque_iterator<_Tp1, _Ref, _Ptr> __last1,
const _Tp2* __first2, const _Tp2* __last2)
{
+#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_pointer)
const bool __simple =
(__is_memcmp_ordered_with<_Tp1, _Tp2>::__value
- && __is_pointer<_Ptr>::__value
+ && __is_pointer(_Ptr)
#if __cplusplus > 201703L && __cpp_lib_concepts
// For C++20 iterator_traits<volatile T*>::value_type is non-volatile
// so __is_byte<T> could be true, but we can't use memcmp with
// volatile data.
- && !is_volatile_v<_Tp1>
- && !is_volatile_v<_Tp2>
+ && !is_volatile_v<_Tp1> && !is_volatile_v<_Tp2>
#endif
);
typedef std::__lexicographical_compare<__simple> _Lc;
+#else
+ typedef std::__lexicographical_compare<false> _Lc;
+#endif
while (__first1._M_node != __last1._M_node)
{
@@ -1327,19 +1330,21 @@ _GLIBCXX_END_NAMESPACE_CONTAINER
_GLIBCXX_STD_C::_Deque_iterator<_Tp2, _Ref2, _Ptr2> __first2,
_GLIBCXX_STD_C::_Deque_iterator<_Tp2, _Ref2, _Ptr2> __last2)
{
+#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_pointer)
const bool __simple =
(__is_memcmp_ordered_with<_Tp1, _Tp2>::__value
- && __is_pointer<_Ptr1>::__value
- && __is_pointer<_Ptr2>::__value
+ && __is_pointer(_Ptr1) && __is_pointer(_Ptr2)
#if __cplusplus > 201703L && __cpp_lib_concepts
// For C++20 iterator_traits<volatile T*>::value_type is non-volatile
// so __is_byte<T> could be true, but we can't use memcmp with
// volatile data.
- && !is_volatile_v<_Tp1>
- && !is_volatile_v<_Tp2>
+ && !is_volatile_v<_Tp1> && !is_volatile_v<_Tp2>
#endif
);
typedef std::__lexicographical_compare<__simple> _Lc;
+#else
+ typedef std::__lexicographical_compare<false> _Lc;
+#endif
while (__first1 != __last1)
{
@@ -1256,8 +1256,10 @@ _GLIBCXX_END_NAMESPACE_CONTAINER
{
typedef typename iterator_traits<_II1>::value_type _ValueType1;
const bool __simple = ((__is_integer<_ValueType1>::__value
- || __is_pointer<_ValueType1>::__value)
- && __memcmpable<_II1, _II2>::__value);
+#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_pointer)
+ || __is_pointer(_ValueType1)
+#endif
+ ) && __memcmpable<_II1, _II2>::__value);
return std::__equal<__simple>::equal(__first1, __last1, __first2);
}
@@ -1420,10 +1422,10 @@ _GLIBCXX_END_NAMESPACE_CONTAINER
{
typedef typename iterator_traits<_II1>::value_type _ValueType1;
typedef typename iterator_traits<_II2>::value_type _ValueType2;
+#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_pointer)
const bool __simple =
(__is_memcmp_ordered_with<_ValueType1, _ValueType2>::__value
- && __is_pointer<_II1>::__value
- && __is_pointer<_II2>::__value
+ && __is_pointer(_II1) && __is_pointer(_II2)
#if __cplusplus > 201703L && __glibcxx_concepts
// For C++20 iterator_traits<volatile T*>::value_type is non-volatile
// so __is_byte<T> could be true, but we can't use memcmp with
@@ -1432,6 +1434,9 @@ _GLIBCXX_END_NAMESPACE_CONTAINER
&& !is_volatile_v<remove_reference_t<iter_reference_t<_II2>>>
#endif
);
+#else
+ const bool __simple = false;
+#endif
return std::__lexicographical_compare<__simple>::__lc(__first1, __last1,
__first2, __last2);