<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Lucida Console";
        panose-1:2 11 6 9 4 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Lucida Console";}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Lucida Console";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoPlainText">I've looked into the situation concerning shared_mutex, and it's a bit of a<o:p></o:p></p>
<p class="MsoPlainText">muddle.<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">In the first place, it appears that N3659 doesn't propose any new<o:p></o:p></p>
<p class="MsoPlainText">functionality in the &lt;mutex&gt; header; everything that's new is in the new<o:p></o:p></p>
<p class="MsoPlainText">&lt;shared_mutex&gt; header. So there doesn't seem to be any solid rationale<o:p></o:p></p>
<p class="MsoPlainText">supporting the published recommendation (i.e.<o:p></o:p></p>
<p class="MsoPlainText">#define __cpp_lib_shared_mutex 201304<o:p></o:p></p>
<p class="MsoPlainText">in &lt;mutex&gt;).<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">I guess we were all counting on Howard to catch errors, and I guess at<o:p></o:p></p>
<p class="MsoPlainText">that point Howard didn't understand the approach well enough to detect the<o:p></o:p></p>
<p class="MsoPlainText">error. In some ways, one of the more interesting questions is, considering<o:p></o:p></p>
<p class="MsoPlainText">the importance of stability of the recommendations, what should be done with<o:p></o:p></p>
<p class="MsoPlainText">that specific recommendation?<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">But then along came N3891, and renamed the shared_mutex class. That's<o:p></o:p></p>
<p class="MsoPlainText">clearly the sort of change that could benefit from a feature-test.<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">FWIW, here's the current state of the draft on my system:<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<table class="MsoNormalTable" border="1" cellpadding="0">
<tbody>
<tr style="page-break-inside:avoid">
<td rowspan="2" style="background:yellow;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3659.html">N3659</a>
<span style="font-size:12.0pt"><o:p></o:p></span></p>
</td>
<td rowspan="2" style="background:yellow;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal">Shared locking in C&#43;&#43;<span style="font-size:12.0pt"><o:p></o:p></span></p>
</td>
<td rowspan="2" style="background:yellow;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal">30.4<span style="font-size:12.0pt"><o:p></o:p></span></p>
</td>
<td style="background:yellow;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><code><span style="font-size:10.0pt">__has_include(&lt;shared_mutex&gt;)</span></code>
<span style="font-size:12.0pt"><o:p></o:p></span></p>
</td>
<td style="background:yellow;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal">1<span style="font-size:12.0pt"><o:p></o:p></span></p>
</td>
<td style="background:yellow;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><em><span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">predefined</span></em><span style="font-size:12.0pt"><o:p></o:p></span></p>
</td>
</tr>
<tr style="page-break-inside:avoid">
<td style="background:yellow;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><code><span style="font-size:10.0pt"><a href="http://localhost/j16/sg10/sd-6.htm#detail.cpp14.n3659">__cpp_lib_shared_mutex</a></span></code><span style="font-size:12.0pt"><o:p></o:p></span></p>
</td>
<td style="background:yellow;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal">201304<span style="font-size:12.0pt"><o:p></o:p></span></p>
</td>
<td style="background:yellow;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><code><span style="font-size:10.0pt">&lt;shared_mutex&gt;</span></code><span style="font-size:12.0pt"><o:p></o:p></span></p>
</td>
</tr>
<tr style="page-break-inside:avoid">
<td style="background:yellow;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3891.htm">N3891</a>
<span style="font-size:12.0pt"><o:p></o:p></span></p>
</td>
<td style="background:yellow;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal">A proposal to rename shared_mutex to shared_timed_mutex<span style="font-size:12.0pt"><o:p></o:p></span></p>
</td>
<td style="background:yellow;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal">30.4<span style="font-size:12.0pt"><o:p></o:p></span></p>
</td>
<td style="background:yellow;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><code><span style="font-size:10.0pt"><a href="http://localhost/j16/sg10/sd-6.htm#detail.cpp14.n3891">__cpp_lib_shared_mutex</a></span></code><span style="font-size:12.0pt"><o:p></o:p></span></p>
</td>
<td style="background:yellow;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal">201402<span style="font-size:12.0pt"><o:p></o:p></span></p>
</td>
<td style="background:yellow;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><code><span style="font-size:10.0pt">&lt;shared_mutex&gt;</span></code><span style="font-size:12.0pt"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">The __has_include test definitely needs to be there. I left in the 201304<o:p></o:p></p>
<p class="MsoPlainText">test mainly just for stability reasons, but I moved it from the &lt;mutex&gt;<o:p></o:p></p>
<p class="MsoPlainText">header to the &lt;shared_mutex&gt; header. I added the 201402 test to<o:p></o:p></p>
<p class="MsoPlainText">&lt;shared_mutex&gt;; that's exactly right. But it's not so clear to me what macro<o:p></o:p></p>
<p class="MsoPlainText">name should be used for that test.<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">So I reached that state more or less by accident, but I have to say that<o:p></o:p></p>
<p class="MsoPlainText">it's actually kind of attractive to me. The 201304 test is pretty much
<o:p></o:p></p>
<p class="MsoPlainText">superfluous, but the more seriously we take stability, the stronger the<o:p></o:p></p>
<p class="MsoPlainText">argument for leaving it in. And we would effectively be recommending that<o:p></o:p></p>
<p class="MsoPlainText">all implementers explicitly indicate which version of the interface they<o:p></o:p></p>
<p class="MsoPlainText">provide -- which may be helpful, considering the volatility of the<o:p></o:p></p>
<p class="MsoPlainText">situation.<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">Comments?<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">Clark<o:p></o:p></p>
</div>
</body>
</html>