Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
When adding -Weffc++ to a Qt Creator project file like below, extra compile warnings from 'Effective C++' by Scott Meyers will be given to help you.
QMAKE_CXXFLAGS += -Weffc++ |
-Weffc++ does not go together smoothly with Qt, however. See -Weffc++ and Qt how to possibly resolve this.
Compile cleanly at high warning levels [1]. Prefer compile errors to runtime errors [2].
Add the following line to your code:
#pragma GCC diagnostic warning "-Weffc++" |
Sometimes suppressing -Weffc++ is the lesser evil (for example when creating a derived class from std::binary_function).
Add the line below to your code to start suppressing the -Weffc++ compile warnings:
#pragma GCC diagnostic push |
-Weffc++ does not go together smoothly with Qt, however. See -Weffc++ and Qt how to possibly resolve this.
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.