Date: Thu, 2 May 2019 14:16:22 +0000
Why does the standard not have std::iterator_const_cast? There is no standard way to convert type like std::deque<std::size_t>::const_iterator to std::deque<std::size_t>::iterator vice versa or std::deque<std::size_t>::const_reverse_iterator to std::deque<std::size_t>:: reverse_iterator
std::iterator_static_cast can also solve the definition problem of contiguous_iterator, if an iterator T can std::iterator_static_cast to typename std::iterator_traits<T>::pointer and void*, then it is a contiguous_iterator.
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
std::iterator_static_cast can also solve the definition problem of contiguous_iterator, if an iterator T can std::iterator_static_cast to typename std::iterator_traits<T>::pointer and void*, then it is a contiguous_iterator.
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
Received on 2019-05-02 09:18:01