Skip to content
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

Switch to boost::core::invoke_swap. Add missing includes. #1195

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

Lastique
Copy link
Member

@Lastique Lastique commented Sep 3, 2023

boost::swap is deprecated and will be removed. Use boost::core::invoke_swap as a replacement.

Also add missing includes.

boost::swap is deprecated and will be removed. Use boost::core::invoke_swap
as a replacement.

Also add missing includes.
swap(result.geodesic_scale, M21);
boost::core::invoke_swap(sin_alpha1, sin_alpha2);
boost::core::invoke_swap(cos_alpha1, cos_alpha2);
boost::core::invoke_swap(result.geodesic_scale, M21);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can, if I see it correctly, replace these calls (here) with just std::swap
And maybe on more places.
But for now this PR looks okay to me.

Copy link
Member

@vissarion vissarion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I am OK with merging.

ps. there are some CI tests failing but probably not related to this PR

@vissarion vissarion merged commit 323b2ff into boostorg:develop Sep 8, 2023
22 of 23 checks passed
@Lastique Lastique deleted the feature/use_invoke_swap branch September 8, 2023 10:17
@Lastique
Copy link
Member Author

Lastique commented Sep 8, 2023

The test failures show that some Boost.Geometry headers are incomplete and probably broken. I didn't know how to fix it, and it wasn't the point of this PR anyway.

For example, this seems to rely on get being found by ADL, but ADL is not performed when template parameters are explicitly specified. At least, not in C++17 that is used by default in gcc 11. Or, if that get should be available without ADL, it is not available, so an include must be missing (I don't know which).

@vissarion vissarion added this to the 1.84 milestone Dec 4, 2023
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.

3 participants