libstdc++: Stop using std::__is_pointer in <deque> and <algorithm> [PR115497]
commit5f10547e021db3a4a34382cd067668f9ef97fdeb
authorJonathan Wakely <jwakely@redhat.com>
Wed, 19 Jun 2024 16:21:16 +0000 (19 17:21 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 21 Jun 2024 16:07:00 +0000 (21 17:07 +0100)
tree85dc464d99ea213116cb9a56ca5f8ff5839ad1b4
parent139d65d1f5a60ac90479653a4f9b63618509f3f9
libstdc++: Stop using std::__is_pointer in <deque> and <algorithm> [PR115497]

This replaces all uses of the std::__is_pointer type trait with uses of
the new __is_pointer built-in. Since the class template was only used to
enable some performance optimizations for algorithms, we can use the
built-in when __has_builtin(__is_pointer) is true (which is the case for
GCC trunk and for current versions of Clang) and just forego the
optimization otherwise.

Removing the uses of std::__is_pointer means it can be removed from
<bits/cpp_type_traits.h>, which is another step towards fixing PR
115497.

libstdc++-v3/ChangeLog:

PR libstdc++/115497
* include/bits/deque.tcc (__lex_cmp_dit): Replace __is_pointer
class template with __is_pointer(T) built-in.
(__lexicographical_compare_aux1): Likewise.
* include/bits/stl_algobase.h (__equal_aux1): Likewise.
(__lexicographical_compare_aux1): Likewise.
libstdc++-v3/include/bits/deque.tcc
libstdc++-v3/include/bits/stl_algobase.h