stl: std::pointer_traits
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user