stl: std::pointer_traits

This commit is contained in:
skypjack
2026-04-21 15:04:53 +02:00
parent 576baa5c57
commit 18f8a103a8
2 changed files with 3 additions and 3 deletions

View File

@@ -35,8 +35,8 @@ class storage_iterator final {
using iterator_traits = stl::iterator_traits<stl::conditional_t<
stl::is_const_v<Container>,
typename alloc_traits::template rebind_traits<typename std::pointer_traits<typename container_type::value_type>::element_type>::const_pointer,
typename alloc_traits::template rebind_traits<typename std::pointer_traits<typename container_type::value_type>::element_type>::pointer>>;
typename alloc_traits::template rebind_traits<typename stl::pointer_traits<typename container_type::value_type>::element_type>::const_pointer,
typename alloc_traits::template rebind_traits<typename stl::pointer_traits<typename container_type::value_type>::element_type>::pointer>>;
public:
using value_type = iterator_traits::value_type;

View File

@@ -184,7 +184,7 @@ class meta_any {
if constexpr(is_meta_pointer_like_v<Type>) {
if(req == internal::meta_traits::is_pointer) {
if constexpr(!stl::is_void_v<stl::remove_const_t<typename std::pointer_traits<Type>::element_type>>) {
if constexpr(!stl::is_void_v<stl::remove_const_t<typename stl::pointer_traits<Type>::element_type>>) {
if constexpr(stl::is_constructible_v<bool, Type>) {
if(const auto &pointer_like = any_cast<const Type &>(value.storage); pointer_like) {
static_cast<meta_any *>(other)->emplace<decltype(adl_meta_pointer_like<Type>::dereference(stl::declval<const Type &>()))>(adl_meta_pointer_like<Type>::dereference(pointer_like));