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

chore: change point_type to point_type_t and use 'using' at those places #1331

Merged

Conversation

barendgehrels
Copy link
Collaborator

@barendgehrels barendgehrels commented Oct 13, 2024

This PR

  • changes typename point_type<X>::type to point_type_t<X>
  • at those places, use using i/o typedef
  • in lines immediately before / after that, also use using
  • sometimes also change to coordinate_type_t there (but that is not consistently)

I also verified clang-tidy with its usage modernize-use-using but that is not giving the desired results at this moment.

Clang tidy can, with its option modernize-use-using, replace typedef with `using. It sometimes works well, but:

  • it can replace typedef differential_quantities<CT, EnableReducedLength, EnableGeodesicScale, 1> quantities with using quantities = int which is plainly wrong
  • it can replace typedef typename boost::range_value<Range const>::type point_t with using point_t = typename boost::range_value<const Range>::type which moves the const to left, and that is not what is in our conventions
  • it removes any newline and changes neatly formatted long typedefs into a very long one-lined using clause.

Therefore I decided to not use it. So this commit changes to point_type_t, plus using. A next might change to coordinate_type_t plus using and then we can change the rest manually, or semi-automatically (still using clang-tidy but judge per change)

@barendgehrels barendgehrels self-assigned this Oct 13, 2024
@awulkiew
Copy link
Member

It looks good. Thanks.

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.

LGTM, thanks!

@barendgehrels barendgehrels merged commit 19f22c2 into boostorg:develop Oct 21, 2024
23 checks passed
@barendgehrels barendgehrels deleted the chore/modernize-point-type branch October 21, 2024 13:47
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