1
0
mirror of https://github.com/nlohmann/json synced 2024-11-15 00:31:05 +00:00
nlohmannjson/single_include
郑少锟 87cda1d664
Use std::iterator_traits to extract iterator_category (#3544)
* Use `std::iterator_traits` to extract `iterator_category`

In third-party STL implementations, `array_t::iterator` might be a pointer (e.g., `vector` in [EASTL](https://github.com/electronicarts/EASTL)) rather than a class, in which case directly using `array_t::iterator::iterator_category` is invalid. This commit fixes it with `std::iterator_traits`, which handles pointers correctly.

* add the changes to the single-header version
2022-06-18 19:14:03 +02:00
..
nlohmann Use std::iterator_traits to extract iterator_category (#3544) 2022-06-18 19:14:03 +02:00