C++ Committee Meeting Trip Report: Kona, 2015

As with all recent meetings, the world (read: WG21) revolves around two things: Modules and Concepts. One will probably be a part of C++17, the other one - definitely not. A few minor changes had also been accepted at the meeting, like register keyword removal and promotion of noexcept into type system.

This time the meeting was held in Kailua-Kona, HI, near the home town of Plumhall and was organized mainly by Tom Plum.

Among most represented companies were Microsoft, Google and Bloomberg. This time, there were several (new) people from Sony, probably attracted by the new study group SG14 created during the previous meeting and devoted to games and low latency.

The next meeting is going to be held in Jacksonville, FL, USA. The one after that, in Oulu, Finland. The working draft for C++17 is scheduled to be produced in Oulu, i.e. in less than a year.

I had been attending the CWG meetings the whole week with two evening sessions (Modules implementation and SG14) to break the monotony.

It appeared that the two major features of C++17 that most people are interested in - Concepts and Modules - might not be a part of C++17.

Concepts

Concepts were almost ready, but their integration into the standard library wasn’t. Some people weren’t comfortable with having a major C++ feature published in the standard and not used in the library, which is why Concepts might end up to be published as a TS (Technical Specification) and only integrated into the standard later, together with library changes.

Modules

Modules are definitely NOT going to be a part of C++17, it had been decided that modules specification will be published as a TS. However, wording for modules was reviewed on one of the CWG (Core Working Group) meetings and can be found in N4466. The wording appeared to have many minor imperfections and was scheduled to be reviewed during one of the next teleconferences so that it can be in good enough shape for voting on the next meeting in Jacksonville.

At an evening session, a Microsoft representative described the modules implementation details they have at Microsoft. As far as I understand, this implementation will be made available in the next technology preview release of Visual Studio. Since modules are macro-agnostic, they have a tool that facilitates the transition by generating a module source file and a special include file that imports the module and #define’s all “exported” macros. They also plan on open-sourcing the module file format and the library to make queries (supposed to be used by external tools). It was also mentioned that the ability to lazy-load any declaration (and definition) from a pre-compiled module is the central part in Microsoft’s design.

CWG Work

Some interesting papers that went through CWG

  • register keyword is removed, but retained as a reserved keyword (see P0001)
  • operator++ for bool is removed (see P0002)
  • noexcept to become a part of the type system (see P0012)
  • introduction of the __has_include preprocessor predicate (P0061)
  • change in inheriting constructors wording and semantics (P0136) - this one is considered a defect of C++11 and other compilers will probably “backport” this C++17 change back to C++11
  • Co-routines (P0057)

The above changes had been applied to the current working draft and will eventually be a part of C++17.

References

Maxim Kartashev

Maxim Kartashev
Pragmatic, software engineer. Working for Altium Tasking on compilers and tools for embedded systems.