view: prefer allocator_traits over allocator for pointer
allocator::pointer has been removed in c++20, so we need to be using allocator_traits::pointer here instead.
This commit is contained in:
parent
0d497738ce
commit
37899b3f8b
22
view.hpp
22
view.hpp
@ -528,18 +528,32 @@ namespace cruft {
|
||||
|
||||
|
||||
template <typename CharT, typename Traits, typename Allocator>
|
||||
view (std::basic_string<CharT,Traits,Allocator> &) -> view<typename Allocator::pointer>;
|
||||
view (
|
||||
std::basic_string<CharT,Traits,Allocator> &
|
||||
) -> view<
|
||||
typename std::allocator_traits<Allocator>::pointer
|
||||
>;
|
||||
|
||||
|
||||
template <typename CharT, typename Traits, typename Allocator>
|
||||
view (const std::basic_string<CharT,Traits,Allocator> &) -> view<typename Allocator::const_pointer>;
|
||||
view (
|
||||
const std::basic_string<CharT,Traits,Allocator> &
|
||||
) -> view<
|
||||
typename std::allocator_traits<Allocator>::const_pointer
|
||||
>;
|
||||
|
||||
template <typename ValueT, typename AllocatorT>
|
||||
view (std::vector<ValueT,AllocatorT>&) -> view<typename AllocatorT::pointer>;
|
||||
view (
|
||||
std::vector<ValueT,AllocatorT>&
|
||||
) -> view<typename std::allocator_traits<AllocatorT>::pointer>;
|
||||
|
||||
|
||||
template <typename ValueT, typename AllocatorT>
|
||||
view (const std::vector<ValueT,AllocatorT>&) -> view<typename AllocatorT::const_pointer>;
|
||||
view (
|
||||
const std::vector<ValueT,AllocatorT>&
|
||||
) -> view<
|
||||
typename std::allocator_traits<AllocatorT>::const_pointer
|
||||
>;
|
||||
|
||||
template <typename ValueT, std::size_t N>
|
||||
view (std::array<ValueT,N>&) -> view<ValueT*>;
|
||||
|
Loading…
Reference in New Issue
Block a user