#2548: Compilation failure: "const" assignment in LoopControl/src/loopcontrol.cc
| Reporter: | Bernard Kelly |
| Status: | new |
| Milestone: | ET_2021_05 |
| Version: | ET_2021_05 |
| Type: | bug |
| Priority: | major |
| Component: | EinsteinToolkit thorn |
Comment (by Roland Haas):
Hmm, these may be causes by a change in C++ where constexpr and const are not longer implying each other, though why it would only happen for you with Intel17 I am not sure. Could be the same library mismatch as in #2457 but I kind of doubt it.
I took a look at the reference for the function call (min) in question: https://en.cppreference.com/w/cpp/numeric/random/linear_congruential_engine/min and it is declared as
static constexpr result_type min();
so the compiler error seems odd. The only thing I can think of is that either the C++ standard library used (incorrectly) does not declare it as constexpr, or that the compiler gets confused b/c I am calling a static class function via an object.
I will try and see if minstd_rand::minx() works instead, assuming I can find a cluster where I can reproduce the issue.
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2548/compilation-failure-const-assignment-in