Is C++0x officialy released? do major compilers support it? - c++

I'm not sure if release is the right word, as it's not software, but a standard.
What I mean is, is the C++0x standard finished? is it still under development?
Do major compilers support it? partially, completely?

is the C++0x standard finished?
Yes! It is finished.
No.
is it still under development?
C++ is still under active development, but C++11 is not.
Yes and no. A Final Committee Draft (FCD) was issued last year. No new features can be added to C++0x at this point; all of the changes at this point are either minor changes or changes required to resolve defects (sometimes the changes required to resolve defects are quite extensive).
In March when the C++ Committee meets in Madrid there should be a vote to submit a Final Draft International Standard (FDIS). If that vote succeeds, C++0x will be "finished," and this document will be submitted to ISO for ratification (or approval or whatever ISO calls the process).
If that vote fails or if the committee decides the document still isn't ready, then we'll have to wait until the next meeting and we'll see what happens. Most of the blog posts from committee members have been positive about finishing in March, though
Do major compilers support it? partially, completely?
Most major compilers have partial support for various C++11 features. The C++11 tag page here on Stack Overflow has a list of links to the latest draft of the Standard and to the documentation for several major compiler implementations with lists of which features are supported and which are not. The Apache Stdcxx Wiki has what is probably the best feature implementation status table available.

C++0x is not standardized yet, but is in final stages of standardization.
And compilers are implementing C++0x features. Visual C++ and GCC 4.x have been adding support for features and the new additions to the standard library, and other compilers have as well.
http://wiki.apache.org/stdcxx/C%2B%2B0xCompilerSupport
http://gcc.gnu.org/projects/cxx0x.html
Compiler support for upcoming C++0x
http://www.aristeia.com/C++0x/C++0xFeatureAvailability.htm
http://blogs.msdn.com/b/vcblog/archive/2010/04/06/c-0x-core-language-features-in-vc10-the-table.aspx

No. It isn't finished yet. They are aiming for the end of 2011.
Some portions of it have been released early in something called TR-1 (Technical Report 1) which are mostly library extensions. Compilers do support this today including Microsoft's latest Visual Studio.

Related

Is it safe to use a C++ Technical Specifications approved for a future standard in a earlier standard?

The Filesystem Technical Specification (TS) has recently been merged into the C++17 standard.
The same TS is also available for C++14, but in this case it's technically only "experimental". However the fact that it's been approved for C++17 makes me think it's mature enough and that it can be used safely.
When working on a C++14 project that will most likely be upgraded to C++ 17 in the future, and assuming the compiler I use supports it on both versions, would you advise against using the "experimental" TS, considering that it will officially be part of the next standard?
My question of course extends to any TS that has been accepted in a future C++ version and that is available for earlier standards.
The real question is whether or not somebody's implemented it, not whether or not it's been approved/merged/whatever of some arbitrary document. Features can be excised, added or modified at any point in time of the standardization process. We've seen things get cut from C++14 right before release and also things that couldn't make it that were later amended. Vendors rely on specific versions of documents when implementing features and so the only surefire way is to consult the documentation of whatever compiler you're using.
Actual implementations can contains features that are not in the current standard, and can have flaws in other features that are defined in the standard or even can fail to implement specific parts - Microsoft was know to let parts of the standard unimplemented.
But if a compiler supports a feature, and if that feature is part of next standard, there is little risk if any that it will disappear in a future version of that particular compiler.
Simply, some other compiler may not implement it as soon as it is approved in standard, but you know whether it is a problem in you specific use case.
Is it safe to use a C++ Technical Specifications approved for a future standard in a earlier standard?
It depends on what you mean by "safe"
Is it portable?
No.
Does it work?
You need to check the release notes of your toolset's version, and the release notes of your standard library's version (they may be different).
Will it work tomorrow?
Who knows?
Should I invest time in code that assumes it works?
probably not.
In summary, the answer is "no".
Use the boost version until the standard is published and your compiler and standard library conforms to it.

What is the difference between -std=c++0x and -std=c++11

I know those flags are for C++11 in Eclipse.
But I don't know what is difference and which one is more preferred.
It seems that they both are working with C++11 normally.
You should prefer -std=c++11.
(Note: I assume -std=c++11x is a typo in your question)
The old -std=c++0x is only needed for older compiler versions that did not support -std=c++11 and they chose that name to express the preliminary and unstable nature of features (and the ABI) of the then upcoming C++11 (and when it was still unclear whether that would eventually become C++10 or C++12). They changes some of the details adapting to the changing working drafts of the standard at the time before the C++11 standard was officially released.
If your compiler supports -std=c++11, there is no reason to use -std=c++0x. Concerning compatibility: There might even be differences and incompatibilities, but these are not just bound to the use of -std=c++0x, but to specific versions of the compiler. When the compiler supports both, they should be identical.
C++ and C Standards are usually named after the year they are published in, which makes it easier to remember by.
For example, in C++, the original Standard was published in 1998, so we talk about C++98, and when we refer to its first correction, published in 2003, we talk about C++03.
It had been purported that the next Standard after would be done for 2008, but since it was uncertain, it was dubbed C++0x, where the x stood for either 8 or 9. In practice though, as we all know, the planning shifted and so we end-up with C++11.
Still, for the next version (C++1x), Bjarne Stroustrup stated his intent to do it in 5 years (so about 2016). For now, there are changes envisionned to the core language (concepts, modules and garbage collection), and the focus seems to be more on extending the library (filesystem for example), but it's still early so who knows!

Which PDF of the C++ ISO standard should I read? [duplicate]

This question already has answers here:
Where do I find the current C or C++ standard documents?
(11 answers)
Closed 9 years ago.
Sometimes, I want to search answers from the C++ standard by myself. Reading standards might help me get an overview of the language principle proposed.
By searching the internet, I was confused by flooding C++ forums and helper websites. They provide all kinds of PDF files for reading.
I don't know which PDF file and/or which version should I adopt.
I found several websites:
JTC1/SC22/WG21
Standing Documents
I wonder whether there is a single site where the standard is posted. Which version should I refer to when solving problems? Some says C++98, while other say C++11, and even the latest working drafts. (many drafts confusing me).
EDIT
I found a useful information from The Standard, which writes:
Except only for the final standards/reports, all C++ committee
documents are freely publicly available, including all working drafts,
many of which closely approximate the published standard. The January
2012 working draft contains the C++11 standard plus minor editorial
changes.
The January 2012 working draft is N3337.
Hope this help you guys.
EDIT
From Wiki C++11, it writes:
The working draft most similar to the published C++11 standard is N3337, dated 12 January 2012; it has only editorial corrections from the C++11 standard.
2018 Update: The C++ standard is maintained on GitHub. You can find an archive of old working drafts here that goes back a few years.
The official C++11 standard INCITS/ISO/IEC 14882:2011 is available at ansi.org for $30. You can Google older standards by searching for e.g. 14882:2003 and looking for PDFs. I'm not sure if it's "legal" to download them, so be sure to feel bad about it if you do so.
Before a standard is published, the committee maintains a Working Draft of the standard document with all the revisions as they introduce them. That Working Draft is eventually voted to become a standard, after which only minor editorial changes are made before it is published as a standard.
The working drafts - and quite a few other papers - are released as a numbered series of documents by the committee and are publicly available except for the final approved draft of the standard. ISO rules keep the last revision "secret" so that people will pay for the standard and that money can be used to fund the organizational work the actual ISO does.
People who don't want to pay for the standard use the final public copy of the working draft as a reference, as it is generally identical to the standard document modulo the minor editorial changes I mentioned earlier. For C++11, that last draft is N3242 - Working Draft, Standard for Programming Language C++. The first working draft after C++11 N3337 may more correctly reflect the final standard (I'm too lazy to compare).
The current Working Draft for C++1y is N3690 - Programming Language, C++. If you're really hardcore, you can track the editor's repo of the current draft at Github.
The official ISO standard for C++11 is ISO/IEC 14882:2011, and official ISO standard for C++03 is ISO/IEC 14882:2003. You usually need to pay to get a copy of these (and to the best of my knowledge that's the only legal way to do so), and these are the official documents.
C++98 is an older version of the language that was superseded in 2003 with C++03, which was mostly minor bug fixes and adjustments to the document. C++11 is the newest C++ standard and was released in 2011. Compiler support is still in-progress. The drafts that you're referring to are draft versions of the standards that are periodically released, which may differ from the final published version. Working papers are mostly proposals for the documents that are considered by the ISO group, but which are not official.
Hope this helps!
Well, you can buy the official standard from ISO (as you've linked). The latest working drafts are sufficient for my purposes (I'm not implementing compilers, linkers, libraries or lexers).
If you're doing serious professional work with the language it's worth paying for. If you're looking to understand the specific technical details of the language, use one of the drafts.

new version of c++

Is there going to be a new version of C++ and when?
The creator of C++ C++0X FAQ:
http://www2.research.att.com/~bs/C++0xFAQ.html
Question: When will C++0x be a formal standard?
But C++ 0X does exists in some degree in various compilers. See both:
Question: When will compilers implement C++0x?
GCC C++ 0X support
To see what C++ 0X will be like, look at the wiki:
Wiki C++ 0X
The C++0x is the unofficial name for the new C++ Standard which is intended to replace C++03 standard (published in 2003). The final draft of the international standard is due in March of 2011. However this does not mean you will be able to use the new features straight away as the standards will have to be implemented by compilers and the completeness of these implementations will vary.
You can find a draft of the new standard here:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3092.pdf
However you can use the Technical Release 1 libraries which include a fair deal of functionality that will appear in the new standard which you can find here:
http://en.wikipedia.org/wiki/C%2B%2B_Technical_Report_1
If you are looking for the status of the C++ox implementation in GCC (which is a free compiler) see this link:
http://gcc.gnu.org/gcc-4.5/cxx0x_status.html
Here is a link to a really detailed FAQ that provides a lot of additional information:
http://www2.research.att.com/~bs/C++0xFAQ.html
However, the experience shows that the complete implementation of a freshly released standard, takes years... If one considers the complexity of the recent additions, I am very pessimistic about getting cross-platform compliant implementations soon.

C++0X when? [duplicate]

This question already has answers here:
When will C++0x be finished? [closed]
(3 answers)
Closed 2 years ago.
Possible Duplicate:
When will C++0x be finished?
What are the latest news about C++0X? (or should I say C++1X) Any release date decided yet?
UPDATE : years later...
The last Draft have been officially finalized few weeks ago, in Mars 2011 and will be officially out around July 2011. The name of the new standard would be C++2011 : http://herbsutter.com/2011/03/25/we-have-fdis-trip-report-march-2011-c-standards-meeting/
Microsoft C++ compiler (VC10) provide C++0x features (lambda, decltype, auto, r-value reference and nullptr). GCC provide a work in progress version that already implements a lot of features (see http://gcc.gnu.org/projects/cxx0x.html).
Comeau C++ seems to be more advanced. CLang started to provide some features but not much for the moment (see http://clang.llvm.org/cxx_status.html )
So, most of the features are be availables for the main c++ compilers at the time the ISO administration officially validate the draft. Some advanced features are still not be available before some years I guess.
It's unlikely that this committee draft will become the FCD. I would say there will be at least 2 more meetings of the standard committee before it goes to FCD.
I think there is something like a 1 year lag between the FCD and the actual standard, so it could be 2011 (or even later!!!)
A number of free and commercial compilers already include support for certain C++0X features.
gcc: static_assert, strongly typed enums, variadic templates...
Codegear C++Builder 2009: static_assert, strongly typed enums...
Visual C++ 2008: mostly TR1 support
As for when the standards committee actually publish, well...
A new draft came out recently, so things are progressing. From this draft to the finalized version, it should be no more than a year before things are finalized. I should note that this draft is the feature-complete version; from here on it should only be revisions. I was just made aware, however, that the path from draft to actual, published, standard is a very long road. I'll push my estimate of a published, accepted standard out to 2010.
How long until we have full compiler compliance? That is a different story. GCC is making good progress on the language features that aren't libraries (see list of features they have implemented), but has no mention of progress on the concurrency features. I can't say anything for when MSVC/dinkumware/whatever other compilers you may use will start implementing things like lambda.
Boost already has much of TR1 implemented, and dinkumware has it all, so you can start using the new libraries already (maybe not in their final form, however).
The committee recently issued a Committee Draft, which will become a Final Committee Draft, which will become a Final Draft International Standard, which will become ISO 14882:20xx, giving an expected publication date of sometime at the end of 2010.
However, GCC 4.3 and later implement increasingly larger subsets of C++0x, and other compiler developers are already working on implementations (none are available yet that I know of).