Networking Library in C++14 - c++

Herb Sutter writes here (on his ISO C++ Spring 2013 meeting trip report) that a networking library is planned to be added to C++14.
What features would this library have initially? What is it based on? Is there a proof-of-concept implementation? My Google-fu must be seriously lacking, because I can't even find the proposal draft.
There are a series of blog posts on http://meetingcpp.com/ listing the proposals for C++14: part 1, part 2, part 3 and part 4. Among all these, I can only find two network-related proposals:
N3555 - a URI Library for C++ (sorry, no link; though its predecessor is N3507.)
N3603 - A Three-Class IP Address proposal (with a related earlier paper N3565 - IP Address Design Constraints.)
Is this all? Will the C++ network library have only these facilities? I don't even know whether these passed the vote or not, as Michael Wong's two part review of the same meeting (Bristol, April 2013) doesn't even mention them.

a networking library is planned to be added to C++14.
A networking library (or set of library components) will appear as a separate Technical Specification, not as part of C++14.
I can only find two network-related proposals
The blog posts don't list all the proposals in the mailings, just the ones someone has found time to write up, there are others such as:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3360.pdf
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3374.htm
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3388.pdf
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3389.pdf
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3565.pdf
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf
What will be part of the TS isn't decided yet AFAIK.

Related

Is TR2 Going to be Released in C++17?

There is lots of sweet stuff in TR2. Is that going to be in C++17?
I understand that TR1 was completed in 2005 and had to wait until C++11 to be standardized.
But I also understand that TR2 is already complete?
My link to C++17 doesn't mention anything about TR2, but I am hoping...
Maybe.
The point of TR (and now technical specifications) is to allow something to mature independent of the standard iteration process. They can publish a TS, see how it works, see if there are any problems in the implementation and/or use of the feature, and if everything works they can then "fold" it into the full standard.
Each TS is considered on its own merits to see if it will be folded into the next standard.
See http://isocpp.org/std/status (thanks #BenjaminLindley) for current status of the Technical Specification working groups.
Any of them, if completed well prior to 2017, could be folded into the standard. It is unlikely they all will be.
A goal is that we can get the std::experimental features to play with (and use if we are willing to accept the ground shifting under our feet) earlier, while having the features once added to std with fewer regrets and specification changes after that point. There are probably also massive organizational overhead advantages to decoupling the main line standard from each of these side projects and allowing them to evolve independently.
The purpose of a Technical Report, or Technical Specification as they are now, is to gain implementation experience and feedback from implementors and users, to better assess the suitability of features for standardization. One would need a crystal ball to know if a particular TS will be included in a future standard, and which future standard that might be.
Version 1 of the Library Fundamentals TS appears to have passed its final ballot at the November 2014 committee meeting, and version 2 is currently being drafted to incorporate feedback and new proposals. This means it is getting closer to being something which implementors and industry users are happy with, and version 1 is now an immutable specification which implementors can choose to conform to. It is still more than possible for later versions, and later standards, to change in ways which would be incompatible with version 1.
Here's a list (from your wikipedia link) of the features of TR2 - and my comments:
Threads - Included in C++11
The Asio C++ library - this is being considered for a future C++ standard
Signals/Slots - no action at this time (that I know of)
Filesystem Library - FileSystem Technical Specification
Boost Any Library - Part of the Library Fundamentals Technical Specification
Lexical Conversion Library - no action at this time (that I know of)
New String Algorithms - no action at this time (that I know of)
Toward a More Complete Taxonomy of Algebraic Properties for Numeric Libraries in TR2 - no action at this time (that I know of)
Adding heterogeneous comparison lookup to associative containers for TR2 - * Included in C++14*

Is open-std.org the official website for C++11 standard documentation?

This may sounds a dumb question but:
Is the below link the official finalized c++11 standard? (or at least the latest version)
n3337
It is my first time to open-std.org and I am not sure whether this is the official website for holding C++ standards.
Just double checking for sure. (The last time I referenced an unfamiliar website (cplusplus.com) was not a pleasant experience though.)
You are not alone with this problem.
Which is why not too long ago isocpp.org was created which, among other things, answers precisely this question.
Quoting from the site:
Where To Get the Current Standard
Purchase the official standard (US$30). You can purchase the official standard for US$30 at the ANSI Store. (Note: The standard at
that link is technically identical to ISO 14882, just with a different
cover page; each national body ratifies the ISO standard as its own
national standard, and so this document’s cover page officially lists
it as U.S. standard INCITS/ISO/IEC 14882-2012 – Programming Language
C++.)
Download the January 2012 working draft (free). 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.
Where To Get Working Drafts
Download a PDF of the current working draft (free). This is the easiest way to get the latest prebuilt PDF. However, you can also…
Get working drafts at GitHub (free), plus version history, diffs, and more! As of November 2011, the LaTeX source of the draft standard
is being actively maintained publicly at GitHub. Check out the repo to
get the current snapshot, or any previous version in the history.
Note that the links in the quote might be outdated at the time of you reading this, while the actual page on isocpp.org should always be up to date.
The officially finalized standard isn't free. You can buy it from your national standardization organization. You can probably buy it for relatively few dollars from ANSI.
The open-std web site is used for the internal standardization work. The papers published there can be very close or even identical to the standard document but they are not the official ISO documents.
There is isocpp as an entry point to the group standardizing C++. This page doesn't provide the official C++ standard either; the official source for any ISO standard is the national standardization organization. However, when choosing a suitable version of the working paper from open-std.org you'll get something fairly close. For example, the document you pointed to is sufficiently close to the C++11 standard to be useful for most uses.

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.

C++ Standardization Net TS1 & Filesys TS

I have a few questions about the standardization, in particulair the prototype of Net TS1 coming this year (see here).
When does it exactly come?
Does it support portable binairy serialization?
Can it serialize to iostreams like files/std::cout etc?
Is there some other place where I can find the current status besides the mailing lists?
When will GCC/Clang implement it?
About the filesystem (Filesys TS):
It was supposed to be finished as prototype this month, why can't I find anything anywhere?
Is it the same a boost::filesystem? (So it can easily be ported.)
I hope I'm not asking too much questions, and I also hope some can be answered!
The latest full Networking Library proposal, based on Boost.Asio, was published in 2007. At that time, C++0x was still planned for sometime before 2010 and there was also a plan for a C++ Technical Report 2. The idea was to get the Networking Library into TR2.
Working on C++0x clearly stole everybody's attention, because not much else happened with the networking library until after it was published. In 2012, they produced a Networking Library Status Report and noticed that a lot had changed with Boost.Asio in the past 5 years. A study group was formed (SG4) to work on the Networking Library.
Now TR2 doesn't seem to be a happening, and it's full steam ahead for C++14 and beyond. As far as I can tell, there has been no explicit mention of a planned time frame for SG4. However, since it was formed, these are the most up-to-date papers from the mailings:
Using Asio with C++11 (N3388)
Urdl: a simple library for accessing web content (N3477)
C++ Internet Protocol Classes (N3477)
A URI Library for C++ (N3507)
IP Address Design Constraints (N3565)
A Three-Class IP Address Proposal (N3603)
Network Byte Order Conversion (N3620)
So combine these with the full TR2 proposal and you have a pretty good picture of the current status.
When does it exactly come?
There doesn't seem to be a specific time frame. Hopefully we'll see a technical specification sometime before C++14 (maybe even in 2013), but this is merely speculation. It'll be done when it's done.
Does it support portable binary serialization?
I don't think so. I can't find any mention of serialization in any of the papers. I think it's probably beyond the scope of the Networking Library.
Can it serialize to iostreams like files/std::cout etc?
See above.
Is there some other place where I can find the current status besides the mailing lists?
Not at the moment. However, they have been gradually making the mailing lists for each of the study groups public, so maybe SG4 will be made public soon. If it is, we'll get a better view of current progress.
When will GCC/Clang implement it?
Not yet!
In January 2013, revision 4 of the Filesystem Library proposal hit the mailing list. Again, I see no explicit time frame, but this and the Networking Library are the two library study groups with the most focus right now. Hopefully we'll be able to see a technical specification for this too sometime this year or at least before 2014.
It was supposed to be finished as prototype this month, why can't I find anything anywhere?
I haven't seen anything about a prototype, but I guess things sometime take a little longer than planned. Perhaps it just isn't public yet. The Bristol meeting is being held next month and all study groups' progress reports are on the agenda. I'm sure we'll see a technical specification when it's ready.
Is it the same a boost::filesystem?
Pretty much! Take a look at the latest revision; it mentions that it is heavily based on the Boost Filesystem Library version 3. There is a small section on differences:
In the Boost library, facilities in class path to handle narrow (i.e. char) character strings with encodings other than the operating system's native encoding depend on codecvt arguments. In the proposal, these facilities depend on locale arguments and additional UTF-8 facilities have been added. The Filesystem Study Group believes this approach is more reliable and useful, particularly as UTF-8 use continues to spread.
Otherwise, the proposal is very similar to the Boost library. Indeed, most of the proposed wording is generated from the same source as the Boost library's reference documentation.
Like all formal ISO C++ documents, Technical Specifications come when they're done. What it will support is hard to say up front. Features may be cut if they're not ready, or conversely publication may be delayed to get a wanted feature in. E.g. C++98 was delayed for ~2 years to merge in the STL.
The FileSystem TS is indeed being derived from Boost FileSystem, so there is very likely a high degree of commonality.

Where can I look at the C++ standard [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Where do I find the current C or C++ standard documents?
I want to use STL with the current program I'm working on and the vendor doesn't support what I feel is a reasonable STL, working is not my idea of reasonable. I have been unable to find a C++ Standard or an STL standard that is not just an API that leaves me wondering if my interpretation is correct or if the vendor interpretation is correct. I've already spent a great deal of time at SGI's site. Any reccomendations? Also, is there any document that's not an API that would be considered the standard?
The draft of the current C++0x standard is available from this page and the official homepage of the C++ standards committee is here.
Information on where to get the current standard document:
Where do I find the current C or C++ standard documents?
Other responses in that question have information on downloads of various drafts of the standards which can be obtained free (the actual ratified standards cannot be obtained free).
The Standard is available as a PDF for ANSI.org. ($18 last time I checked, downloadable).
$18 for a downloadable PDF was considered a breakthrough, since previously ANSI only sold it standards in hardcopy form, for several thousand dollars a copy. (Normally, ANSI standards have a very limit market -- only motorcycle helmet manufacturers are going to buy the ANSI Standard for motorcycle helmets etc), and Standard sales was the primary way ANSI financed it's operation.
Each national standards body in ISO can make the Standard available as they see fit. I'm told British Standards had made a deal to publish it in book form, but I don't know it taht ever came about.
i googled "C++ ansi standard" and clicked the first result
What's available for free on the
Internet?
The C++ standard went through two
Committee Drafts (CDs) which were made
available for public inspection and
comment. Changes made to the second CD
after the public comment period were
submitted to the member bodies for a
vote and became the official standard.
CD2 of the C++ standard is very
similar, but not exactly the same, as
the final standard.
body of a draft (see directory listing for TOC etc)
The book's ISBN is 978-0470846742, if you're interested in treeware. It's quite up to date (includes the Technical Corrigendum). You are right in suspecting it's the definitive resource when arguing with compiler vendors. The standard doesn't prescribe performance, but it does put upper bounds on the big-O complexity of many algorithms