libstdc++: Define std::is_pointer_interconvertible_base_of for C++20
authorJonathan Wakely <jwakely@redhat.com>
Tue, 10 Aug 2021 14:37:23 +0000 (15:37 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 11 Aug 2021 15:53:22 +0000 (16:53 +0100)
commit4fa6c0ec350bb4a8dd52a7c6f9881ab427151588
tree9acd3e1fb9cd4bdeea861b30d7e9b30853e32353
parent04ddd108d12b78d8a7e243d7481fe7d8394b0c4f
libstdc++: Define std::is_pointer_interconvertible_base_of for C++20

Implement these traits using the new built-ins that Jakub added
recently.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

* include/std/type_traits (__cpp_lib_is_pointer_interconvertible)
(is_pointer_interconvertible_base_of_v)
(is_pointer_interconvertible_base_of): Define for C++20.
* include/std/version (__cpp_lib_is_pointer_interconvertible):
Define.
* testsuite/23_containers/span/layout_compat.cc: Use correct
feature test macro for std::is_layout_compatible_v.
* testsuite/20_util/is_pointer_interconvertible/value.cc: New test.
* testsuite/20_util/is_pointer_interconvertible/version.cc: New test.
libstdc++-v3/include/std/type_traits
libstdc++-v3/include/std/version
libstdc++-v3/testsuite/20_util/is_pointer_interconvertible/value.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_pointer_interconvertible/version.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/span/layout_compat.cc