2 ms·
Maybe they should just add a compiler flag and split off the behaviour, so by default the bug isn't present, but it's available for those who need it? --use-
by KronisLV 5y ago
Maybe they should just add a compiler flag and split off the behaviour, so by default the bug isn't present, but it's available for those who need it?
--use-old-behaviour-range-based-for-loop
- Tajnymag 5y agoAre there already similar flags for other bugs in place?
- TonyTrapp 5y agoIn the general case, the C++ compiler always needs to know according to which C++ standard the code should be interpreted, so any code compiled as C++14 code should for example use the old behavior. More specifically, some compilers such as Microsoft's compiler support some their old bugs through specific flags (e.g. permissive mode in MSVC).
- Tajnymag 5y agoThanks. Makes sense. You are right that that's basically the reason why the standard level is such an important thing to specify while compiling.