4 ms·
There are not such flags, but they would not be useful if there were. Real C++ programs link code of many different ages. Generally, you can only afford to make
by ncmncm 5y ago
There are not such flags, but they would not be useful if there were. Real C++ programs link code of many different ages. Generally, you can only afford to make the new code, that you are writing now, the new way, and maybe modernize stuff immediately around it. The old stuff is typically well-exercised, and as long as it does its job you have no reason to touch it or, often, see it.
But it is for the new code that the most value is available.
Generally, if there are two ways to do something, and one appeared in a recent Standard, using that is usually the better choice. Cppreference.com helpfully tags each bit with when it appeared.
- gandvor 5y agoRegarding modern check flags: clang-tidy has its modernize-* flags