Skip to content

Commit

Permalink
Adding iterator to string.cpp (#132)
Browse files Browse the repository at this point in the history
When compiling without `to_chars` support enabled (that is, `__cpp_lib_to_chars >= 201611L` is false), `string.cpp` uses `std::back_inserter`, which requires `<iterator>` be included. This dependency is missing and could cause some compilers to fail (e.g., Xcode 16.1 building under C++23). This PR adds the necessary include.
  • Loading branch information
fosterbrereton authored Feb 7, 2025
1 parent ea5e048 commit 0ebffaa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#include <array>
#include <charconv>
#include <system_error>
#else
#include <iterator>
#endif

/**************************************************************************************************/
Expand Down

0 comments on commit 0ebffaa

Please sign in to comment.