Am Dienstag, den 10.10.2017, 08:45 +0200 schrieb Mathieu Malaterre: [...] With this mind I'd like to make mandatory the -std=c++XY flags when > compiling either a c++ library or a stand-alone c++ program: > > 1. Either upstream define the explicit -std=c++XY flags by mean of > its build system, > 2. Or the package maintainers needs to explicit change the CXXFLAGS > to pass the appropriate version of the c++ standard. In which case > this should be documented in the README.Debian file.
I don't think there is much to gain from it. Whenever there is a change in the major version of gcc/g++ many bugs show up and all involved really do a great job fixing these. IMHO switching from an older C++ standard to a newer one is no different. In fact, I think that this forced change is an excellent incentive to review older packages. > 3. As a fallback, dh should initialize the CXXFLAGS with -std=gnu++98 Why would you pick such an old standard as the default? Also note that at least with boost there were instances where the ABI changed depending on whether C++11 or higher was enabled or not. - Also for that reason I think we should strife for all packages using the same C++ standard, and this should be the default of the currently used C++ compiler. Forcing a lower standard on a package as a maintainer I would consider only as a (temporal) workaround to fix RC bugs, and preferable only for leaf packages. Best, Gert