Skip to content

Conversation

@georgthegreat
Copy link
Contributor

Similar to #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.

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.
@rouault
Copy link
Member

rouault commented Mar 2, 2025

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

@georgthegreat
Copy link
Contributor Author

Thanks!
I have noticed the typo too, but was waiting for two other PRs to be merged.
I will create the PR to upstream, let's keep this one open for now.

@georgthegreat
Copy link
Contributor Author

I filed an upstream PR here:
p-ranav/argparse#399

@georgthegreat
Copy link
Contributor Author

@rouault it seems that upstream is not quite active.
Maybe we can accept this change without upstream accepting it?
The code in gdal is different from upstream anyway.

@rouault
Copy link
Member

rouault commented Mar 6, 2025

can you precise which environment requires this change ? GDAL tests on quite a large number of platforms and we haven't hit such issue

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 70.351% (+0.3%) from 70.047%
when pulling 454817d on georgthegreat:patch-2
into 26fc9a3 on OSGeo:master.

@georgthegreat
Copy link
Contributor Author

We use patched libc++ with iterators replaced with raw pointers.
You can observe our sources e. g. here:
https://github.com/yandex/perforator/blob/c680583aea53e44ebee0189ac5d8b146f09bb5d2/contrib/libs/cxxsupp/libcxx/include/__config_site#L21

gdal is used internally in our monorepo, but libc++ is the same.

@jratike80
Copy link
Collaborator

We use patched libc++ with iterators replaced with raw pointers.

Would the change help anybody else than you in the GDAL community?

@rouault rouault merged commit 8ae4a5f into OSGeo:master Mar 6, 2025
38 checks passed
@georgthegreat
Copy link
Contributor Author

We use patched libc++ with iterators replaced with raw pointers.

Would the change help anybody else than you in the GDAL community?

Yes, it will make the code simpler by removing unnecessaries.

@georgthegreat georgthegreat deleted the patch-2 branch March 6, 2025 22:21
Jwohnlf pushed a commit to Jwohnlf/gdal that referenced this pull request Mar 23, 2025
Fix build when iterators are raw pointers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants