5 ms·
I think core guidelines [0] are aiming that. Some of it is already supported by tools like clang-tidy, but as far as I understand the ultimate goal is to have s
by karlicoss 7y ago
I think core guidelines [0] are aiming that.
Some of it is already supported by tools like clang-tidy, but as far as I understand the ultimate goal is to have some sort of flag (e.g. --sane) that would only accept 'reasonable' subset of c++ and reject legacy stuff.
However this document is a bit raw, lots of todos, so I'm not sure how close are we to such flag.
[0] https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines
- mlvljr 7y agoThere is something even better: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1881r0.html http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p188... cheers from the shadowland :)
- ATsch 7y agoI think the only good way to do this is off of the back of C++ Modules. Having it as a compiler flag means that all files in a project, including libraries, must be compliant. With C++ modules putting an end to the naive #include, translation units could specify the C++ specification they are compliant with, and hence gracefully remove or add new features on a translation-unit level.
- steveklabnik 7y agoThis is the idea for the 'epochs' proposal https://vittorioromeo.info/index/blog/fixing_cpp_with_epochs.html https://vittorioromeo.info/index/blog/fixing_cpp_with_epochs...