fix: compilation with recent clang#527
Conversation
|
I have two fixes, which allow compilation on MacOS:
|
|
Can you push 1 directly to this PR? |
needs to be close to the class definition
|
🤔 actually, point 1 sounds suspicious. |
|
I think the problem was that in |
|
No, the definition of |
Even when I make the forward declaration in the file Accelerator.h, it doesn't compile. I also only know this to work for smart pointers? I've personally never seen it for vectors (or similar). |
|
You're right. But it's a total mystery why things worked before 🤷 |
In the past, we used different compilers. Now, we are dependent on newer compilers due to the inclusion of the C++-17 feature std::filesystem added about a year ago. Because we don't declare our C++-version anywhere in our CMake-structure (as far as I know), the newer compilers probably use newer C++-standards. |
|
We do fix the version of the standard to use: https://github.com/MRChemSoft/mrchem/blob/master/cmake/compiler_flags/CXXFlags.cmake#L16 |
|
Why was I able to reproduce one compilation issue with Clang 21 on Linux, but not all of the ones you encountered? |
Oh, haven't seen this before. But still, we need newer compilers and therefore introduce new errors and a lot of warnings. |
ARM on macOS works in mysterious ways ... |
|
well, thanks for keeping an eye out for new errors and warnings 🙌 |
No description provided.