democloid / picoTracker

BSD 3-Clause "New" or "Revised" License
187 stars 17 forks source link

T_Factory.h doesn't compile with gcc14 #179

Open simotek opened 3 months ago

simotek commented 3 months ago

Compilation fails for me with the following error.

/home/simon/src/build/picoTracker/sources/Foundation/T_Factory.h:12:11: error: template-id not allowed for destructor in C++20 [-Werror=template-id-cdtor]
   12 |   virtual ~T_Factory<Item>(){};
      |           ^
/home/simon/src/build/picoTracker/sources/Foundation/T_Factory.h:12:11: note: remove the '< >'
democloid commented 3 months ago

Not sure why it's trying to compile as C++20, as we specify C++17 on the CMake config file https://github.com/democloid/picoTracker/blob/34036960f8c44de984dbf3472373760b2d69fb4a/sources/CMakeLists.txt#L8

Can you explain a bit more what you're trying to do or how you're compiling, platform, etc.?

maks commented 3 months ago

I should chime in to say Simon was doing this in my workshop this morning. I think he's building current master and running on SUSE Linux. I've never tried gcc14 on Linux yet, but I'll try it out soon. It could be similar to going from gcc 12 to 13 when there was a subtle change in behaviour due to different defaults.

democloid commented 3 months ago

It's still not clear if this is a GCC14 issue or C++20, would like to understand that, as the error message mentions c++20 and we are at C++17 on the codebase