I have heard that C++14 is finally here, and I must ask is C++11 now considered outdated. The only reason I ask is because I am about to purchase a book that deals with changes to C++ (C++11), and I want to know if the practices are going to be outdated since C++14 is around the corner (Don't want to waste time and money). Thanks in advance, for those who answer.
Yep. I've been putting off really reading up on C++11 precisely because VS is my main development environment.
I might also add that if you're going for extreme portability in your code (especially regarding mobile development and other more esoteric platforms), sticking to plain old C++98 makes even more sense.
Nothing (as far as I know) in C++11 is being deprecated. C++14 is kind of a 'bug fix' release in that it fixes some issues in C++11 and finishes expanding on what was added.
The Visual C++ compiler has fairly good coverage for the most major C++11 features. From what I've herd from different talks it sounds like they're going to start implementing C++14 features before completing support for C++11 (they are implementing the most popular features first. http://msdn.microsoft.com/en-us/library/vstudio/hh567368(v=vs.110).aspx
I use Visual Studio without actually using its compiler - I use the clang Windows snapshot which has platform toolsets for Visual Studio that you can set in the project settings. This gives me access to cool things like C++1z.
I would say C++11 will not be outdated until C++17 or whatever C++1z will turn in to.
@helios, let me get this straight, if I plan to port my code to other platforms such as Mobile or any other embedded system then C++98 is a better choice? if yes then that's ironic. Is it due to the fact that C++11 is newer and it hasn't caught on yet on other platforms.
@Easton, that's kinda odd, wouldn't it make more sense to just finish C++11 completely then move on to C++14, since C++14 builds off of C++11.
> The Visual C++ compiler has fairly good coverage for the most major C++11 features.
Yes, particularly after update 3 (or with CTP Nov 2013).
C++11 is language + library, and overall, the Microsoft offering is one of the better C++ implementations. (The LLVM clang++/libc++ is even better; but a complete libc++ implementation is available only on the BSD family. There is also a kludged libc++ implementation on Linux, which works well most of the time.)
wouldn't it make more sense to just finish C++11 completely then move on to C++14
Not necessarily. C++14 builds off only a few C++11 features so C++14 features aren't reliant on a fully compliant C++11 implementation. For example return type deduction and binary literals could have been added to C++98.
let me get this straight, if I plan to port my code to other platforms such as Mobile or any other embedded system then C++98 is a better choice? if yes then that's ironic. Is it due to the fact that C++11 is newer and it hasn't caught on yet on other platforms.
Pretty much. Library support on non-PC hardware is particularly sketchy.
> I'd wager that the majority of C++ shops around haven't even started using C++11 yet.
I don't know about the 'majority'; but every competent C++ shop had been using C++11 features (except for move semantics and perfect forwarding) for a dozen years or so prior to 2011.
Certain features like variadic templates and constexpr functions could only be simulated by preprocessor kludges. Boost used a lot of them; boost mpl and boost type traits were staples before the advent of standard type traits, boost function, boost bind, boost bind were mainstream, there were several flavours of smart pointers in wide use over and above what boost provided ....
To be fair, there still is a fairly large body of code where namespace Std (say) is an alias for one of std, std::tr1 or boost depending on the specific version of the toolchain being used.