-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Fix concept requirements #2513
Fix concept requirements #2513
Conversation
cpp/dolfinx/fem/utils.h
Outdated
@@ -769,7 +770,8 @@ void pack_coefficients(const Form<T>& form, IntegralType integral_type, int id, | |||
{ | |||
case IntegralType::cell: | |||
{ | |||
auto fetch_cell = [](auto& entity) { return entity.front(); }; | |||
auto fetch_cell |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the changes removing auto
intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't compiling. I think because auto&
is wrong, but auto
seems OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it's wrong.
Have you checked performance? This is a critical part of the code - is the pass by value an issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not an issue for std::span
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you test? It brings in a copy of the size at every call.
Currently gcc-12 is showing warnings about "requires" statements, which this fixes.
See Issue #2507