Closed svenihoney closed 1 month ago
Hmm. I am unable to reproduce this. Where's the difference between your code and my attempt?
Hm. Can't reproduce it on godbolt as well, did you try my CMake project?
Perhaps try the following:
docker run --rm -it dockcross/linux-x64 bash
git clone https://github.com/svenihoney/trompeloeil-effcpp.git
cmake -B build -S trompeloeil-effcpp/
cmake --build build
and you will get the error.
I understand where the problem comes from, I was just baffled that my "obvious" reproduction didn't reproduce it and wondered if you could see a mistake.
Can you try branch Weffc
and see if it has resolved your issues?
The warnings about uninitialized member variables are, IMO, incorrect. They are non-trivial types with default constructors that are run at object creation time. Maybe something worth reporting to gcc?
The warnings about default generated operator=
were potential bugs, had any future change happened to accidentally call them, so thanks for those.
No, wait, I spoke too soon. The fix doesn't work with older C++ standards... :disappointed:
Now the CI pipeline went green for all compilers and standards. Phiew.
Perfect, errors are gone!
Just tagged release v48 which includes this.
If I compile my sources with gcc and with
-Weffc++
I get the following warnings:The code compiles, but with
-Werror
the compiler bails out with an error.See https://github.com/svenihoney/trompeloeil-effcpp for a minimal example project.