3 ms·
It seems that the change from C++11 to C++14 broke the semantics of "inline". I'm not sure who thought that was a good idea. You'll find that code that used to
by daly 10y ago
It seems that the change from C++11 to C++14 broke the semantics of "inline". I'm not sure who thought that was a good idea. You'll find that code that used to compile no longer does. Reverse-engineering the failure all the back to the language specification is VERY time consuming. Finding the right compiler switch (--std) will also take a while, assuming you even know there IS such a compiler switch. It also seems (I might be wrong) that gcc defaults to C++11 but g++ defaults to C++14.
Breaking legacy code without access to the original authors makes maintaining that code extremely difficult. Can you rewrite all of the "inline" instances in a 1M line C++ program without side-effects such as performance loss? When the lead programmer requires C++17 for their spiffy new code, are you the person who has to rewrite the "broken legacy code"? Does your IDE know all of the standards?
They should change the language name each time, such as "Alpha", "Beta", "Gamma", etc. so you can say that you "know" the "Beta" language. As it is I don't know anyone who can seriously claim to know "C++".
"C++ Standard" is an oxymoron.
- marvy 10y agoI find this odd; surely that shouldn't happen.
- 72deluxe 10y agoI find it easier to ask what standard they work to. If someone says "I write C++", I would ask "what version?" as there is a significant gulf between 2003 and 2011 standards, for example. Or, as is very common, they are not sure and it you will know that they don't know enough C++, or are in danger of writing C++ like it was C. If someone says "I play the guitar" and you ask "acoustic, electric? hollow bodied?" and they don't know, you'd be surprised. If someone says "I own a Volkswagen Golf" and you asked what mark (4, 5, 6 or 7) and they didn't know, you'd assume they knew nothing about they car or didn't have to replace any parts on it, even simple things like windscreen wipers as they'd have bought the wrong ones. It's the same with C++ - the spec makes a huge difference so we should probably all be aware of what we're writing.
- JoeAltmaier 10y ago....or, they look up in the manual when they have to change the wiper blades.
- 72deluxe 10y agoI was implying that they haven't bought new blades because a Mk4 wiper blade will not fit a Mk5. You cannot shop for wiper blades without knowing what your model and mark is.
- taejo 10y agoBut you can forget, especially knowing it'll still be in the manual the next time you buy wiper blades.
- gpderetta 10y agoWhat changes are you referring to? cppreference[1] (which, granted, is not authoritative) does not document any changes in inline semantics in C++14. [1] http://en.cppreference.com/w/cpp/language/inline http://en.cppreference.com/w/cpp/language/inline