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:
Danny Robson 2020-02-17 14:30:30 +11:00
parent 0d497738ce
commit 37899b3f8b

View File

@ -528,18 +528,32 @@ namespace cruft {
template <typename CharT, typename Traits, typename Allocator> 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> 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> 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> 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> template <typename ValueT, std::size_t N>
view (std::array<ValueT,N>&) -> view<ValueT*>; view (std::array<ValueT,N>&) -> view<ValueT*>;