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

refactor: Remove uses of std::enable_if #3484

Merged
merged 7 commits into from
Aug 24, 2024

Conversation

stephenswat
Copy link
Member

With the move to C++20, we no longer need std::enable_if as we can use the much more elegant requires keyword. This commit swaps virtually all uses of std::enable_if, except those in the existing pre-C++20 concepts library.

@stephenswat
Copy link
Member Author

This was quite meditative.

Copy link

github-actions bot commented Aug 6, 2024

📊: Physics performance monitoring for ef03e2a

Full contents

physmon summary

Copy link
Member

@paulgessinger paulgessinger left a comment

Choose a reason for hiding this comment

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

I like it.

  1. Can you remove the cases where function template arguments are no longer necessary?
  2. Can you move the requires clause behind the function name and argument list?

@stephenswat stephenswat force-pushed the refactor/remove_enable_if branch 2 times, most recently from d072610 to e8ad837 Compare August 20, 2024 16:05
@stephenswat
Copy link
Member Author

@paulgessinger this is now all requires-east (requires after the function name) and I removed all the unnecessary type aliases.

@stephenswat stephenswat force-pushed the refactor/remove_enable_if branch 4 times, most recently from 361732f to af3b230 Compare August 21, 2024 12:50
@paulgessinger paulgessinger added this to the next milestone Aug 22, 2024
Copy link
Member

@paulgessinger paulgessinger left a comment

Choose a reason for hiding this comment

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

Good stuff.

Core/include/Acts/Utilities/Axis.hpp Outdated Show resolved Hide resolved
Core/include/Acts/Utilities/Axis.hpp Outdated Show resolved Hide resolved
Core/include/Acts/Utilities/Delegate.hpp Show resolved Hide resolved
Core/include/Acts/Utilities/VectorHelpers.hpp Outdated Show resolved Hide resolved
@stephenswat stephenswat force-pushed the refactor/remove_enable_if branch 2 times, most recently from e371eeb to 4784e31 Compare August 22, 2024 09:28
With the move to C++20, we no longer need `std::enable_if` as we can use
the much more elegant `requires` keyword. This commit swaps virtually
all uses of `std::enable_if`, except those in the existing pre-C++20
concepts library.
Copy link

sonarcloud bot commented Aug 24, 2024

@kodiakhq kodiakhq bot merged commit 9589527 into acts-project:main Aug 24, 2024
42 checks passed
@acts-project-service
Copy link
Collaborator

🔴 Athena integration test results [9589527]

Build job with this PR failed!

Please investigate the build job for the pipeline!

@acts-project-service acts-project-service added the Breaks Athena build This PR breaks the Athena build label Aug 24, 2024
@paulgessinger paulgessinger modified the milestones: next, v36.2.0 Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaks Athena build This PR breaks the Athena build Component - Core Affects the Core module Component - Examples Affects the Examples module Event Data Model Track Fitting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants