-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
bugSomething isn't workingSomething isn't workingquestionFurther information is requestedFurther information is requested
Description
Building with gcc 11.4. 0 on current develop the following error arises:
[...]
ALP/include/graphblas/base/distribution.hpp:140:33: error: body of ‘constexpr’ function ‘static constexpr size_t grb::internal::Distribution<backend>::local_offset(size_t, size_t, size_t) [with grb::Backend backend = grb::reference; size_t = long unsigned int]’ not a return-statementIndeed the C++-11 standard dictates that the body of a constexpr function must contain only a return statement (see here ).
The function that triggers the error is the following:
I see two possible solutions:
- Removing the
(void) ...statements, but this results in warnings about unused parameters, which is the reason I introduced those lines in the first place.
Of course we could suppress such warnings, but that's definitely something I would avoid if possible. - Somehow telling the compiler to use a newer C++ standard when compiling this file, as newer versions allow such
constexprfunctions
Furthermore the fact that testing passed on the CI and previous testing means that we are likely not explicitly telling the compiler to use a fixed C++ standard version.
I think we should consider this to avoid this kind of unexpected compile errors.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingquestionFurther information is requestedFurther information is requested