    <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
     <channel>
        <title>ACCU  :: Standards Report</title>
        <link>https://members.accu.org/index.php/articles/2414</link>
        <description>Professionalism in Programming</description>
        <dc:language>en-us</dc:language> 
        <dc:creator>Administrator</dc:creator> 
        <admin:generatorAgent rdf:resource="http://www.xaraya.org" /> 
        <admin:errorReportsTo rdf:resource="mailto:webeditor@accu.org" />
       <sy:updatePeriod>hourly</sy:updatePeriod>
       <sy:updateFrequency>1</sy:updateFrequency>
       <docs>http://backend.userland.com/rss</docs>




<div class="xar-mod-head"><span class="xar-mod-title">CVu Journal Vol 29, #4 - September 2017</span></div>

<table border="0" cellpadding="1" cellspacing="0">
    <tbody>
    <tr>
        <td valign="top">
            Browse in :
       </td>
       <td valign="top">

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c76/">Journals</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c77/">CVu</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c377/">294</a>
<br />
</td>
   </tr>
   </tbody>
</table>




<div class="xar-error">
   <p>
 <strong>Note:</strong> when you create a new publication type,
the articles module will automatically use the templates
<em>user-display-[publicationtype].xt</em>
and <em>user-summary-[publicationtype].xt</em>.
If those templates do not exist when you try to preview or display a new article,
you'll get this warning :-)  Please place your own templates in themes/<em>yourtheme</em>/modules/articles . The templates will get the extension .xt there. </p>
</div>
<div class="xar-norm xar-standard-box-padding">
   <h1><strong>Title:</strong>&nbsp;Standards Report</h1>
<p><strong>Author:</strong>&nbsp;Bob Schmidt</p>
<p>
<strong>Date:</strong> 04 September 2017 16:16:51 +01:00 or Mon, 04 September 2017 16:16:51 +01:00</p>
<p><strong>Summary:</strong>&nbsp;Roger Orr reports from the latest C++ meeting.</p>
<p><strong>Body:</strong>&nbsp;<p>Our usual correspondent, Jonathan Wakely, is an expectant father at the time of writing and so I have offered to write a report instead.</p>

<p>The last C++ committee meeting was in Toronto in July and was, as usual, a busy week. There were around 120 people present for the meetings, which were held at the University of Toronto and also sponsored by the Fields Institute, Waterfront International, Codeplay, IBM, Google, and Christie Digital. Nine national bodies were represented: Canada, Finland, France, Poland, Russia, Spain, Switzerland, UK, and US.</p>

<p>The ISO voting on the draft International Standard for the 5th edition of C++ (colloquially referred to as â€˜C++17â€™) was still in progress during the meeting â€“ the voting period actually ends on Sept 3rd. All being well it is hoped that all the national bodies will vote â€˜Yesâ€™ and weâ€™ll soon be able to report that we do in fact have C++17.</p>

<p>In the meantime, work is progressing on the next edition of the standard â€“ provisionally named C++20. Somewhat to my surprise, we ended the week by adding a sizeable feature to the next standard: the plenary session voted by a large majority in support of a paper adding <strong>concepts</strong> into the C++ working paper by merging in much of the Concepts Technical Specification (TS). While this has been on the agenda for C++20 (after we failed to achieve consensus for doing so in C++17) I was not expecting this to happen so quickly â€“ and with such a high level of support.</p>

<p>This vote had been preceded by a long discussion on Tuesday afternoon,  resulting in accepting a number of relatively minor changes to the existing Concepts TS. These include: </p>

<ul>
	<li>Overloading on constrained functions restricted to named concepts. (The existing matching on the expressions used in the requires clause was found to be problematic in some cases.)</li>
	
	<li>Adopting a <strong>single</strong> concept definition syntax. The new syntax moves away from the alternatives in the TS of function template and variable template syntax  to a slightly simpler form, which looks like a variable template but without the (unnecessary) specification of the <code>bool</code> type. It is also a grammar term in its own right, which means future enhancements to the syntax are possible without causing interference with other types of template. A simple example of the new syntax defining a concept for 'integer sized' types might be:</li>
</ul>

<pre class="programlisting">
    template &lt;typename T&gt;
    concept int_sized = (sizeof(T) == sizeof(int));</pre>
	
<p>This discussion in turn was followed by an evening session, hosted by the Evolution working group, which primarily focussed on the so-called â€˜abbreviatedâ€™ syntaxes, which have proved quite controversial. During this session, two polls were taken about this specific issue. There was a very small majority in favour of merging everything achieved so far into the working paper and a strong majority (4:1) in favour of moving everything <em>except</em> some of the abbreviated syntaxes into the working paper. This does not preclude adding abbreviated syntax later â€“ there was almost unanimous support for encouraging further work on this.</p>

<p>Andrew Sutton (the Concepts project editor) and Richard Smith (the C++ standard project editor) worked extremely hard â€“ and accurately â€“ to produce draft wording for this merge for the Core working group to start reviewing after lunch on Wednesday. We spent most of two days in CWG on wording review of the paper and also made a few small drive-by fixes of the wording and completed the review in time for a vote on the paper <a href="#[S1]">[1]</a> on Saturday.</p>

<p>So, what have we got? Given a concept, such as <code>int_sized</code> above, we can write:</p>

<pre class="programlisting">
  template &lt;typename T&gt; requires
    int_sized&lt;T&gt; bool foo(T t);</pre>
	
<p>or, equivalently, we can write this as:</p>

<pre class="programlisting">
  template &lt;int_sized T&gt; bool foo(T t);</pre>
  
<p>The function <code>foo</code> will only be visible in the overload set when the <em>constraint</em> is satisfied: in this case <code>sizeof(T) == sizeof(int)</code>.</p>

<p>The Concepts TS provides for two additional syntaxes that are as yet <em>not</em> merged, they are the <em>template introduction</em> syntax:</p>

<pre class="programlisting">
  int_sized{T}
  bool foo(T t);</pre>
  
<p>and the <em>abbreviated function template</em> syntax:</p>

<pre class="programlisting">
  bool foo(int_sized t);</pre>
  
<p>Note that there are a variety of different terms being bandied about for these two syntaxes: for this report, Iâ€™ve stayed with the terms used in the TS itself.) The Ranges TS, which is based on the Concepts TS, does not use either of these syntaxes in its specification so any decisions about merging this into the working paper are not dependent upon making progress with the abbreviated forms. (There are a couple of small edits that will be needed before merging, but nothing major.)</p>

<p>This was probably the biggest news of the meeting, but there was a lot going on with other technical specifications as well.</p>

<p>Three technical specifications are now completed, and will be moved to publication once the final changes from the week are made and reviewed. (So there is, at present, no final document to link to: for the latest working papers see <a href="#[S2]">[2]</a>, <a href="#[S3]">[3]</a> and <a href="#[S4]">[4]</a>.)</p>

<p>These are the Coroutine TS, the Ranges TS, and the Networking TS. </p>

<p>The Coroutines TS is based on work by Microsoft, with considerable design input from the concurrency working group, and has recently also been implemented on Clang trunk.</p>

<p>The Ranges TS is a â€˜conceptisedâ€™ version of the STL algorithms, with additional features included such as support for ranges (!) â€“ that is, objects with a <code>begin</code> iterator and an <code>end</code> â€“ and support for projections to enable on-the-fly data transformations. While specified in terms of the Concepts TS, there is an experimental implementation without them <a href="#[S5]">[5]</a>.</p>

<p>The Networking TS is heavily based on Boost.Asio, so has a long track record and much user experience. Weâ€™re now getting close to having a standardised network library in C++, which will remove an embarrassment in todayâ€™s connected world!</p>

<p>The intention is for experience to be gained with these three â€“ both in implementing them and also in using them. For example, Gor Nishanov (the project editor for the Coroutine TS) is keen for someone other than him to implement the Coroutine TS in a compiler to validate that the wording is sufficiently precise. The wider the variety of compilers offering each TS, and of users trying them out, the more sure we will be that the design is ready to add into the main C++ standard.</p>

<p>Finally, the Modules TS is now ready for voting <a href="#[S6]">[6]</a>, and the various national bodies will shortly receive the draft for review. I personally hope we get the TS published soon, as this will give people a chance to work on different implementations and experiment with using it. We can then see what the benefits and difficulties really are and how much it delivers of what has been anticipated!</p>

<p>Those who attended this yearâ€™s conference and enjoyed Herb Sutterâ€™s closing keynote may be interested to know that he presented a paper about meta classes <a href="#[S7]">[7]</a> at the Toronto meeting in an evening session. (Those who missed the keynote can now watch the video â€“ this was embargoed by Herb until after the Toronto meeting <a href="#[S8]">[8]</a>.) There was a lot of interest in Herbâ€™s direction, and strong encouragement to address this level of metaprogramming. I anticipate weâ€™ll see further papers in this area, but it will need other facilities â€“ such as reflection â€“ to be included in the working paper before something like this could be considered for inclusion.</p>

<p>The next WG21 meeting will be in Albuquerque, New Mexico, in November. This is incidentally where the ACCU Chair Bob Schmidt lives, so there might be opportunity for an informal ACCU get-together sometime during the week.</p>

<p>I note that WG14, the C working group, is also meeting in Albuquerque; it is the week before the C++ meeting. This is intended to make travel arrangements simpler for the people who attend both meetings. They are working on a C17 version (this will be a Technical Corrigendum, i.e. containing fixes for bugs in the C11 standard) and also looking for a major revision in the future.</p>

<h2>References</h2>

<p class="bibliomixed"><a id="[S1]"></a>[1]	<a href="http://wg21.link/p0734">Wording Paper, C++ extensions for Concepts, http://wg21.link/p0734</a></p>

<p class="bibliomixed"><a id="[S2]"></a>[2]	<a href="http://wg21.link/n4649">Working Paper for the Coroutine TS: http://wg21.link/n4649</a></p>

<p class="bibliomixed"><a id="[S3]"></a>[3]	Working Paper for the Ranges TS: <a href="http://wg21.link/n4671">http://wg21.link/n4671</a></p>

<p class="bibliomixed"><a id="[S4]"></a>[4]	Working Paper for the Networking TS: <a href="http://wg21.link/n4656">http://wg21.link/n4656</a></p>

<p class="bibliomixed"><a id="[S5]"></a>[5]	Experimental range library for C++11/14/17: <a href="https://github.com/ericniebler/range-v3">https://github.com/ericniebler/range-v3</a></p>

<p class="bibliomixed"><a id="[S6]"></a>[6]	Modules PDTS: <a href="http://wg21.link/n4681">http://wg21.link/n4681</a></p>

<p class="bibliomixed"><a id="[S7]"></a>[7]	Metaclasses: <a href="http://wg21.link/p0707">http://wg21.link/p0707</a></p>

<p class="bibliomixed"><a id="[S8]"></a>[8]	<a href="https://www.youtube.com/watch?v=6nsyX37nsRs">https://www.youtube.com/watch?v=6nsyX37nsRs</a></p>
</p>
<p><strong>Notes:</strong>&nbsp;</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
