-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Fix build when iterators are raw pointers #11880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Similar to OSGeo#11879, `typename Iterator` might be just a raw pointer. The most corrent way would be using `std::iterator_traits` to get the type properly, but it seems that current static_cast can be simply removed.
|
There's a typo in this commit (extra parenthesis), but I would be more confortable if this change was submitted upstream to https://github.com/p-ranav/argparse and accepted there prior to here |
|
Thanks! |
|
I filed an upstream PR here: |
|
@rouault it seems that upstream is not quite active. |
|
can you precise which environment requires this change ? GDAL tests on quite a large number of platforms and we haven't hit such issue |
|
We use patched libc++ with iterators replaced with raw pointers. gdal is used internally in our monorepo, but libc++ is the same. |
Would the change help anybody else than you in the GDAL community? |
Yes, it will make the code simpler by removing unnecessaries. |
Fix build when iterators are raw pointers
Similar to #11879,
typename Iteratormight be just a raw pointer. The most corrent way would be usingstd::iterator_traitsto get the type properly, but it seems that current static_cast can be simply removed.