Commit 87cda1d
authored
* 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
1 parent 1373023 commit 87cda1d
File tree
2 files changed
+2
-2
lines changed- include/nlohmann/detail/iterators
- single_include/nlohmann
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12393 | 12393 | | |
12394 | 12394 | | |
12395 | 12395 | | |
12396 | | - | |
| 12396 | + | |
12397 | 12397 | | |
12398 | 12398 | | |
12399 | 12399 | | |
| |||
0 commit comments