-
Notifications
You must be signed in to change notification settings - Fork 432
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
prevent invalid conversion from const compile error #4030
Conversation
picked back to |
Hm, this change does indeed "prevent invalid conversion from const compile error" messages. |
I think the type can just be made |
I already know that this works with gdal 3.7.0. (I'm trying to patch this for the gdal port in vcpkg.)
IMO this is a bad guideline when it comes to |
What is a bad guideline? What would break at runtime? |
"WFM, anyway" is a bad guideline IMO when it comes to
Nobody knows. "Modifying a const object through a non-const access path ... results in undefined behaviour.". Repeating my questions in other words: |
You misundersood. Making the type const, rather than applying the cast should be fine. WFM meant that such a change compiles for me (the pointer to const is allowed in the contexts in which it is used). |
Backports PDAL/PDAL#4030 and 4043, pointed out by landry who is busy with more important things right now.
Compiling PDAL was breaking with:
I'm running on Ubuntu, with:
Tests were passed after this change.