Hi, I'm a beginner programmer and I'm having difficulty understand what c++98 and c++11 is. I can't really find much documentation explaining if new IDEs or compilers have c++11 or if that is an extra feature or what. Sorry if i'm sounding a bit dumb but I'm just totally confused. Clearly c++11 is an upgraded version of c++98 with new coding features I'm sure but what I'm wondering is how you tell what version you're using I guess? I really don't even know what I don't know honestly so I'm not really sure what I'm asking. Anyone who could help me understand what these are and why, and if all compilers use the new one or not would be very helpful. Thanks! Sorry for the poorly worded question, I'm just super confused (and new!) but I'm trying to learn.
Any recent compiler/IDE will be C++11 compliant for core C++11 features. For instance Support For C++11/14/17 Features (Modern C++ with Visual Studio) - https://msdn.microsoft.com/en-us/library/hh567368.aspx
For new C++11 features a quick reference is the Reference section here- http://www.cplusplus.com/reference/
The C++11 items are clearly marked. For example, the new STL array class template - http://www.cplusplus.com/reference/array/array/
@LB
The __cplusplus macro is less useful than it should be.
Compiler support for specific standards is spotty. Both MSVS and GCC have (near) complete support for C++11. All compilers (except maybe Clang) are lacking in support for C++14. C++17 is not yet ratified so all support is provisional/experimental.
The most correct way to figure out what C++ standard(s) your compiler supports is to read the manual.
A good way to move forward is to google "c++ standard support" with the name of your chosen compiler.
I may be missing something, but according to this https://gcc.gnu.org/projects/cxx-status.html#cxx11 gcc has full C++14 support since version 6 and support for about half of the confirmed features of C++17.
Unlike earlier versions of the GNU implementation, version 6.1 defaults to -std=C++14
(unfortunately, non-conforming GNU constructs are still enabled without -pedantic-errors). http://coliru.stacked-crooked.com/a/363623445efaf88c
Unlike earlier versions of the GNU implementation, version 6.1 defaults to -std=C++14
(unfortunately, non-conforming GNU constructs are still enabled without -pedantic-errors).
I thought it defaulted to -std=gnu++14? Either way it seems you're right that -pedantic-errors is still needed even with -std=c++14 - that's unfortunate.
So what I'm seeing here from the replies is that C++11 is basically the standard for all modern compilers. A certain amount comply with C++14 and fewer have some provisional support of C++17 which is still in early forms of testing. So the newer versions of C++ are nothing you will ever need to download from a special website to have access to. It appears to all be something that the compiler someone is using will begin to utilize and comply with as new versions become available...provided the programmer is using a modern compiler and downloads the updates. (I am using Xcode so I'm under the assumption it's fairly up to date and will continue to be as new versions of C++ are released)