I’ve been wondering for the past few days whether it’s possible to make g++
and clang++
more pedantic than with -std=c++11 -w -pedantic
.
Especially, I’d like these behaviors:
- when replacing a virtual method,
g++
andclang++
have to raise an error if theoverride
keyword is not present in the prototype of the replaced method (I think it’s a warning for now); - all methods must have exception hint (
noexcept
or whatever), because it’s quite important, especially for ctor / dtor; - I’m also looking for any other pedantic features you’d have in mind.