https://lkml.org/lkml/2014/10/19/94
That's why projects that use GCC or a compatible compiler should use the -std option to set the targeted standard and not rely on the default.
The world moves on. Though if you're an active project, moving along with the world is probably a better option than throwing in --std=c++really-old and deliberately refusing to use new stuff.
GCC has already been getting steadily more strict by default, or at least opt-in with -Wall -Werror. The last time we updated our build environment, we had to go in and #include all the headers that were formerly implicit (or #include-d by other headers), and add in the 'const' every time we referred to a string literal. The possibly-unassigned variable checker also got a lot more sophisticated and now would enter called functions.
Doing all those checks at build time is slowing the build down too.
At least with clang, -Weverything is not measurably slower than no warnings at all on any vaguely realistic code base.
With regard to speed, I just know that tcc is 10 times faster than gcc, and that makes a huge difference to me. Anything pointless is really irritating because I know how slow gcc is.
(Also I'd much rather have fast binaries slowly compiled than the opposite)
(I would rather a fast compiler until I am ready to release a final product and then swap. I probably do more cross compiling and creating custom toolchains than you.)
(I know, it doesn't work like that. 99.5% means syntax elements or some such, not lines of code. But it still works out the same in a medium-to-large code base; 99.5% compatibility breaks more than you expect.)
I've used both autoconf and cmake to do functional testing of which headers are available, and then include the most recent available out of <memory>, <tr1/memory> and <boost/shared_ptr.hpp>, bringing them into a project::compat namespace to make the codebase not need to care which is in use, and the same for a number of other tr1/boost types now in C++11/14.
I'm now at the point where for some projects I've been able to strip out this entirely and just use the C++11 types directly.
I don't understand why C++03 didn't just use the std:: namespace.
http://stackoverflow.com/questions/14131454/visual-studio-20...
For the Technical Specifications, we're following their header directory and namespace rules (<experimental/meow>).
What I ended up doing is something like this:
// Ensure that _LIBCPP_VERSION is defined if necessary
#include <ciso646>
#if defined(_LIBCPP_VERSION) || __cplusplus > 199711L
// C++11 or libc++
#include <memory>
using std::shared_ptr;
#else
// C++03 or libstdc++
#include <tr1/memory>
using std::tr1::shared_ptr;
#endifMy personal opinion is to leave it the way it is - or at the very least default to C++11 first.