IBM Z and LinuxONE - Languages - Group home

The View from C++ Standard Meetings Urbana Nov 2014, Skillman Jan 2015, and Cologne Feb 2015

By FANG LU posted Tue March 24, 2020 07:40 PM


"I am a HAL Nine Thousand computer Production Number 3. I became operational at the Hal plant in Urbana, Illinois, on January 12, 1997.”, said HAL9000 in 2001: A Space Odyssey. From reading this book as a kid, I have always wanted to visit University of Urbana-Champaign, knowing that even in 1964 when this book was written by Arthur C. Clarke, it was already known as a hot bed of innovation for computer science.

Although we did not get a HAL9000 computer in 1997, but seventeen years later the C++ Standard meeting arrived to meet at the Siebel Computing Center to discuss a new Standard, known now as C++17. Even though it was at this meeting where we voted to officially request a new work item to start on C++17, the content of C++17 in fact had started several meetings ago in the form of new features and the Technical Specifications.

Since we were in a quiet period in the last meeting at Rapperswil, due to C++14 being in ballot, Rapperswil motions are voted in this meeting because we could not vote on them last time.

In fact as I write this (just after the Cologne meeting, which is 3 months after the Urbana meeting), C++14 is already officially ratified. It is currently available on the ISO website at a fairly high price of 198 Swiss Franc..

But rest assured we are working with other national Standards organization to make it available at a more reasonable price. BSI will likely look at an edition that is priced much much lower.

Most groups spent its primary focus on Technical Specification (TS) wording and C++17 proposals, followed by issue processing.

The major TSs in-flight were Concept-lite, Library Fundamental, Transactional Memory, Parallelism, Concurrency and the start of Library Fundamental 2. The phases can be understood from here:

A just announced change in 2015 has essentially eliminated the final DTS phase of TS such that the PDTS phase is essentially the last phase. This applies to many of these TSs in flight such that PDTS will be the last phase before publication.

The end result was that Parallelism TS (aka parallel STL) is moving to DTS balloting stage with the addition of trsansform/reduce and packaging exceptions, with the National Body (NB) Comment responses from the PDTS ballot. Not all NB comments were in because there is a mismatch in precise time of completion of all NB comments this meeting. So there was a ballot resolution telecom on December 5th to include any straggler NB comments. This was done with no additional changes and Parallelism TS has completed its PDTS phase. After this will come Parallelism 2 TS which will likely contain parallel execution, and vector/simd execution.

There was a discussion as to whether we want the current Concurrency TS (which has only the futures extensions) to go to PDTS, or wait for more features (e.g. such as google or asio executors). Most wanted to have more extensions to be added in the forms of latches/barrier and atomic shared pointers, but without the current form of google executors. There has been some discussion around the inheritance nature of the current Google executor design, and that there is an upcoming form of executors from teh Networking TS in the form of boost::asio which may be the the preferred form for concurrency executors. The net result is that Concurrency TS was waiting on LWG working out issues involving latches/barriers and atomic smart pointers. This was done this week at the Cologne meeting. So Concurrency remains waiting to enter PDTS stage. There is reasonable expectation that it might ship as a PDTS at Lenexa now, after what we have now done in the Cologne LWG meeting addressing the latches/barriers and atomic smart pointer issues.


ASIO was reviewed extensively and exclusively by a dedicated group at the Cologne LWG meeting. Its sheer size (nearly 200 pages) means work continues beyond this meeting using a specially constructed short-lived mailing list between meetings to complete reviewing the changes suggested in this meeting. They identified 175 issues, some are design issues and a short list is to be added to gitHub where this TS is hosted. There will be a revised paper for Lenexa. The design changes were minor, but potentially pervasive. They involve such design choices as

  • buffers having a sequence of buffers,
  • the executor concept in asio, 
  • posix networking,
  • interface get a new connection using socket and that it is better to pass the socket to the callback instead of providing memory to store it and keeping track of lifetime from the outside,
  • returning begin iterator and used in functions, and the opportunity to make it more like ranges

These design issues will be investigated for LEWG. The resultant working paper could be voted at Kona in October such that a Networking PDTS will be issued. This TS uses string view and array view from Fundamental TS, and could also benefit from type-erased allocator.

Library fundamental TS also moved to DTS balloting post Urbana after addressing the PDTS ballot comments and many minor changes. Both are likely to be approved as TS by May 2015 as it seems that both Parallelism and Library fundamental TS need to go through the DTS phase as they actually entered that phase before 2015.

My Study group on Transactional Memory is SG5 and it also made progress after multiple core and library wording reviews, leading to PDTS ballot vote being approved to start after this meeting. We will receive National Body comments in-between meeting, leading to us addressing those comments in the May 2015 meeting. As of this writing at the end of February, Canada and US have already issued their comments and we have considered many of these comments in continuing chat sessions within our SG. None seems to be major, so unless other NBs submitted comments we are not aware of, we believe TM TS will be published.

Concept TS had multiple reviews before and at this meeting. It was reviewed in Issaquah, Rapperswil, two 2 hour telecons and 2+ days of time at this meeting in core. Although fundamental design did not change, many details are shifting and so there was no consensus to issue a PDTS at the Urbana meeting. A between meeting F2F meeting was held at Skillman, New Jersey by Bloomberg on Jan 26-28 to bring the reviewer and Andrew Sutton together to close on the final details of this 40 page document. The meeting started just as a massive "crippling and potentially historic blizzard" otherwise known as Winter Storm Juno lead to a complete shutdown of Manhattan, so many members had to telecon in even though they were staying in nearby hotels. However, the work to compete review of the document was far less and they were also voted to go out as a PDTS at the Skillman meeting.

For both Transactional Memory and Concept TS, they entered PDTS in 2015, and as such will be allowed to follow the new 2015 rule making PDTS as their last stage before publication.

All these TSs, in addition to the already completed FIlesystem TS are potential candidates for standardization in some form for 2017.

Core processed about 100 new issues since Rapperswil, and 107 Defect Reports were moved at this meeting. Their motions are now also aiming for C++17, the next C++ Standard. A few interesting approved motions involved:

  • N4259: Uncaught_exceptions() new std library that gives you proposes a new function int std::uncaught_exceptions() that returns the number of exceptions currently active, meaning thrown or rethrown but not yet handled.
  • N4262: Forwarding references gives a proper name "Forwarding reference" to that which has no name thus replaces the popular "universal reference" that was originally coined by Scott Meyers. Interestingly, Scott originally considered this but dismissed it due to a very special case with auto &&.
  • N4266: Attributes for namespaces and enums should be allowed in the grammar but were missed. This started while trying to add [[deprecated]] to enums and namespaces when we found no syntax for those locations.
  • N4267: U8 character literals is now added for character as well as string literals. This is another tiny fix resulting from a hole in C++11.
  • N4268: Full constant expressions in non-type template arguments allows wider range of constant expressions
  • N4230: Nested namespace definitions, use a qualified id syntax ns1::ns2::ns3 without requiring full syntax as before
  • N4295: Folding expressions introduces a new kind of primary expression that allows parameter packs to be expanded as a sequence of operators. We call these "fold expressions", named after the ubiquitous fold algorithm that applies a binary operator to a sequence values (also called accumulate in the standard library). It generalizes pack expansions and stands on its own, and not just for concepts.
  • N3928: extends Static Assert by adding a Default text message facility which was originally proposed by Robert Klarer and conforms to his vision.
  • N3922: adds New Rules for auto deduction from braced-init-list. This resulted from a Finnish comment to C++14 that was originally rejected asking to handle that an auto specifier should not result in an initializer_list when used with a braced-init-list. However, a subsequent more urgent case found by Mikael Kilpeläinen show that init-captures deduce types the same way as auto does. This means that direct-initialization using braces in an init-capture will create an initializer_list. The solution is that direct-initialization using braces would not yield initializer_lists, whereas copy-initialization using braces would.
  • N4051: adds typename which is permitted for non-template type-parameters, but not for template type-parameters. This difference is artificial and is a common surprise. Removing it would make the language simpler.
  • N4086: Removing trigraphs??! removes support for trigraphs from C++17, but still allows implementations to be compliant if they continue to support it. Only IBM and yours truly disapproved. But we also recognize a world that is becoming more trigraph adverse based on our paper N4210 which accept that users need to prepare for such a world. We felt it was better to enable the Standard to move forward but alert the world that this removal should be noticed.

N3994 Range-based for loop was the only motion from core that did not move forward due to questions of teachability of syntax. This is 

There will be more core telecon meetings at a rate of 1 every month to continue the processing.

Library WG had also approved a large number of motions for C++17 at Urbana. Too large for this blog to list. But work also started on Library Fundamental 2 TS with features including:

  • N4273: adds uniform container erasure as a first container based algorithms, unless you consider swap
  • N4061: adds GCD and LCM in header <numeric>; both are constexpr
  • N4257: adds propose a new ostream_joiner class that acts like ostream_iterator except that the delimiter is only placed between output elements
  • N4282: proposes observer_ptr, a (not very) smart pointer type that takes no ownership responsibility for its pointees, i.e., for the objects it observes. As such, it is intended as a near drop-in replacement for raw pointer types, with the advantage that, as a vocabulary type, it indicates its intended use without need for detailed analysis by code readers.

There was much concerns on this last one as many did not like the proposal. The problem is that with an observer_ptr which converts transparently to or from T*, many mght feel they need the opposite thing.But it does not convert to a raw pointer.

As a rebuttal to the scepticism of the committee, Walter Brown, the author reported he has 8-9 years of experience with this usage at Fermi Lab and reported that this feature, though initially disliked, were later much appreciated, because it pointed out where people had forgotten ownership issue.

IN my view, this is just for a TS used to gain experience and it is precisely this kind of question that we want to answer through that experience. I felt comfortable voting for it, reserving the possibility of voting against it if user or implementation experience turns out to be negative given enough time.

There were a few other small but important matters to address.

Special Math was a Technical Report released as its own International Standard during C++11. Now it seems it will be brought back for conditional support.

Library Evolution actually finished processing early after giving feedback on the design part of Library Fundamental 2 TS as well as looking at I/O library and regex. They regrouped to help LWG which has been backlogged due to the large number of issues now that stream to them from all the various SGs. The same also applies to Core which is why both groups now need telecons, and extra meetings to do issue processing, as we just did this last week in Cologne for LWG.

Evolution Group Chair is now Ville Voutillianen who takes over from Bjarne Striustrup. I wish to thank Bjarne for serving for 25 years of leading us through several C++ Standard releases. Ville has been involved first as a Minute taker extraordinaire for EWG, then took on maintenance of the issue list. He now keeps tap of the TINY issues list that contains discussions too small to spin off into a separate SG. Congratulation to Ville for earning this role through his hard work.

For the most recent LWG meeting in Cologne which was a pure LWG meeting to enable more dedicated paper reviews and issue processing due to the mounting backlog, more candidates were reviewed for Library Fundamental 2 TS in addition to the list that was processed in Urbana above.

  • N4189: scoped_resource: this needs to go back to LEWG for review
  • N3939: extending make_shared to supprot arrays: in good shape, and expecting revisions
  • N4346: multidimensional array_view: in good shape, and expecting revisions
  • N4372: const-propagating smart pointer wrapper: ready to move forward
  • N4315: make_array: ready to move forward
  • N4129: source code information capture: author was not here but we are expecting revisions

For concurrency SG1, we reviewed:

  • N4313: Parallelism TS improvements: in good shape, and expecting revisions
  • N4162: atomic smart pointers: ready to move forward but excludes atomic_unique_ptr
  • N4281: C++ latches and barrier: heavily revised with the author giving revisions overnight, but because of the changes it will need to be returned to SG1 even though LWG is happy with it as is

The group also looked at more C++17 papers. As I mentioned earlier, a second group broke off to consider Boost::ASIO for the Network TS, as the author Christopher Kohlhoff was here and went through 5 full days of review, with 175 suggested changes. A short-lived mailing list will be set up to continue the review of the revision with the aim of getting a TS out for the October Kona meeting.

This completes 3 trip reports and sets us up into shape going into the May Lenexa meeting with the potential at the end of that meeting for publication of the Transactional memory TS and possibly Concepts, PDTS for Concurrency with added papers from this meeting, Networking and Library Fundamentals 2, and of course the collection of new features for C++17.

Tomorrow, I will be giving a talk at CERN to motivate Supersymmetry (SUSY) scientists on using Transactional Memory. Next month, I will be back in Germany at Karlsruhe for a Parallel 2015 keynote. I am due to come back in Sept for the new OpenMP's Users meeting (OpenMPCon) and IWOMP 2015 in Aachen. If you know of anyone using OpenMP, please let them know and submit a talk at OpenMPCon. Hope to see you at one of these events.