json
json copied to clipboard
Copy/alias std::iter_value_t in implementation of detail::value_type
The main problem with detail::value_type
is that it does not use iterator_traits::value_type
. This is not an issue with most iterators, but is definitely an issue with proxy iterators (e.g. std::vector<bool>::iterator
). Standard Ranges library uses a multi-step approach to determine the appropriate value type of a range. We can copy (most of) it and even alias it in C++20.
Where do we need to use iter_value
?
When we use detail::value_type
, that is for conversions.