<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: What Happened in&#160;Frankfurt?</title>
	<atom:link href="http://cpp-next.com/archive/2009/08/what-happened-in-frankfurt/feed/" rel="self" type="application/rss+xml" />
	<link>http://cpp-next.com/archive/2009/08/what-happened-in-frankfurt/</link>
	<description>The next generation of C++</description>
	<lastBuildDate>Tue, 09 Mar 2010 21:18:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Doug Gregor</title>
		<link>http://cpp-next.com/archive/2009/08/what-happened-in-frankfurt/comment-page-1/#comment-89</link>
		<dc:creator>Doug Gregor</dc:creator>
		<pubDate>Tue, 25 Aug 2009 01:01:45 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=122#comment-89</guid>
		<description>&lt;blockquote cite=&quot;comment-85&quot;&gt;

&lt;strong&gt;&lt;a href=&quot;#comment-85&quot; rel=&quot;nofollow&quot;&gt;Rodrigo&lt;/a&gt;&lt;/strong&gt;: 
However, I really hate the number of explicit concepts the ID tends to generate. I find the fact that BackInsertionContainer and friends are explicit embarassing considering they are refinements of another explicit concept: Container. If a type is explicitly told to be a Container, they should be able to automatically match the mentioned refinements. If the types are’t Containers, they shouldn’t.
&lt;/blockquote&gt;

&lt;p&gt;Once the &quot;root&quot; concept is explicit, in most cases it doesn&#039;t require any more concept maps even if all of the more-refined concepts are explicit. This is because of the way we tend to use concept maps: we write one concept map for the most specific concept (e.g., RandomAccessIterator rather than Iterator, BackInsertionContainer rather than Container), and the compiler implicitly generates concept maps for the less-specific concepts.&lt;/p&gt;

&lt;blockquote cite=&quot;comment-85&quot;&gt;

&lt;strong&gt;&lt;a href=&quot;#comment-85&quot; rel=&quot;nofollow&quot;&gt;Rodrigo&lt;/a&gt;&lt;/strong&gt;: Doug came with a rationale on why it wasn’t this way. My opinion is that it was a wrong decision. Other options may exist. For example, we could have: concept, auto concept, explicit concept. &lt;a href=&quot;http://zone-team.com.mx/temp/c2.cpp&quot; rel=&quot;nofollow&quot;&gt;http://zone-team.com.mx/temp/c2.cpp&lt;/a&gt; summarizes my thoughts.
&lt;/blockquote&gt;

&lt;p&gt;You can actually get this kind of behavior from the current concepts proposal, by using associated requirements rather than refinement. Check out how the OutputIterator concept is specified, which boils down to this:&lt;/p&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;pre class=&quot;cpp&quot; style=&quot;font-family:monospace;&quot;&gt;concept Iterator&lt;span style=&quot;color: #000080;&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;typename&lt;/span&gt; Iter&lt;span style=&quot;color: #000080;&quot;&gt;&gt;&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#123;&lt;/span&gt;
  &lt;span style=&quot;color: #666666;&quot;&gt;// basic iterator requirements&lt;/span&gt;
&lt;span style=&quot;color: #008000;&quot;&gt;&#125;&lt;/span&gt;
&#160;
&lt;span style=&quot;color: #0000ff;&quot;&gt;auto&lt;/span&gt; concept OutputIterator&lt;span style=&quot;color: #000080;&quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;typename&lt;/span&gt; Iter, &lt;span style=&quot;color: #0000ff;&quot;&gt;typename&lt;/span&gt; Value&lt;span style=&quot;color: #000080;&quot;&gt;&gt;&lt;/span&gt; &lt;span style=&quot;color: #008000;&quot;&gt;&#123;&lt;/span&gt;
  requires Iterator&lt;span style=&quot;color: #000080;&quot;&gt;&lt;&lt;/span&gt;Iter&lt;span style=&quot;color: #000080;&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;;&lt;/span&gt;
  &lt;span style=&quot;color: #666666;&quot;&gt;// assignability requirements to allow, e.g., *i = value&lt;/span&gt;
&lt;span style=&quot;color: #008000;&quot;&gt;&#125;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Here, Iterator is an explicit concept, so you need to write a concept map for it (or one of its more-refined concepts, like RandomAccessIterator) to &quot;opt in&quot; to the iterator system. Then, however, you get the OutputIterator concept automatically matched for your iterator types for any Value type that can be assigned to the reference type of the iterator. I think this gives basically the same capability as the non-auto, non-explicit concepts in your example, and it has definitely come in handy in the Standard Library.&lt;/p&gt;

&lt;p&gt;Thanks for coming out to share ideas and comments; it&#039;s great to see different perspectives on a feature like Concepts.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<blockquote cite="comment-85">

<strong><a href="#comment-85" rel="nofollow">Rodrigo</a></strong>: 
However, I really hate the number of explicit concepts the ID tends to generate. I find the fact that BackInsertionContainer and friends are explicit embarassing considering they are refinements of another explicit concept: Container. If a type is explicitly told to be a Container, they should be able to automatically match the mentioned refinements. If the types are’t Containers, they shouldn’t.
</blockquote>

<p>Once the &#8220;root&#8221; concept is explicit, in most cases it doesn&#8217;t require any more concept maps even if all of the more-refined concepts are explicit. This is because of the way we tend to use concept maps: we write one concept map for the most specific concept (e.g., RandomAccessIterator rather than Iterator, BackInsertionContainer rather than Container), and the compiler implicitly generates concept maps for the less-specific concepts.</p>

<blockquote cite="comment-85">

<strong><a href="#comment-85" rel="nofollow">Rodrigo</a></strong>: Doug came with a rationale on why it wasn’t this way. My opinion is that it was a wrong decision. Other options may exist. For example, we could have: concept, auto concept, explicit concept. <a href="http://zone-team.com.mx/temp/c2.cpp" rel="nofollow">http://zone-team.com.mx/temp/c2.cpp</a> summarizes my thoughts.
</blockquote>

<p>You can actually get this kind of behavior from the current concepts proposal, by using associated requirements rather than refinement. Check out how the OutputIterator concept is specified, which boils down to this:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">concept Iterator<span style="color: #000080;">&lt;</span><span style="color: #0000ff;">typename</span> Iter<span style="color: #000080;">&gt;</span> <span style="color: #008000;">&#123;</span>
  <span style="color: #666666;">// basic iterator requirements</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0000ff;">auto</span> concept OutputIterator<span style="color: #000080;">&lt;</span><span style="color: #0000ff;">typename</span> Iter, <span style="color: #0000ff;">typename</span> Value<span style="color: #000080;">&gt;</span> <span style="color: #008000;">&#123;</span>
  requires Iterator<span style="color: #000080;">&lt;</span>Iter<span style="color: #000080;">&gt;</span><span style="color: #008080;">;</span>
  <span style="color: #666666;">// assignability requirements to allow, e.g., *i = value</span>
<span style="color: #008000;">&#125;</span></pre></div></div>

<p>Here, Iterator is an explicit concept, so you need to write a concept map for it (or one of its more-refined concepts, like RandomAccessIterator) to &#8220;opt in&#8221; to the iterator system. Then, however, you get the OutputIterator concept automatically matched for your iterator types for any Value type that can be assigned to the reference type of the iterator. I think this gives basically the same capability as the non-auto, non-explicit concepts in your example, and it has definitely come in handy in the Standard Library.</p>

<p>Thanks for coming out to share ideas and comments; it&#8217;s great to see different perspectives on a feature like Concepts.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Adf3m</title>
		<link>http://cpp-next.com/archive/2009/08/what-happened-in-frankfurt/comment-page-1/#comment-86</link>
		<dc:creator>Adf3m</dc:creator>
		<pubDate>Sat, 22 Aug 2009 22:52:31 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=122#comment-86</guid>
		<description>&lt;p&gt;I know how much work you and your associates put into Concepts and how disappointing it is when something you have worked on eventually fails to make the cut.&lt;/p&gt;

&lt;p&gt;I am sure the decision we reached in Frankfurt was the right one for both C++ and Concepts. And certainly this &lt;a href=&quot;http://www.sohbet32.Net&quot; title=&quot;Sohbet&quot; rel=&quot;nofollow&quot;&gt;Sohbet&lt;/a&gt; &#124; &lt;a href=&quot;http://www.muhabbetim.in&quot; title=&quot;muhabbet&quot; rel=&quot;nofollow&quot;&gt;muhabbet&lt;/a&gt; was not a decision to kill Concepts but to give it more time so that we could produce a well honed feature to include in the release of C++ after C++0x.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I know how much work you and your associates put into Concepts and how disappointing it is when something you have worked on eventually fails to make the cut.</p>

<p>I am sure the decision we reached in Frankfurt was the right one for both C++ and Concepts. And certainly this <a href="http://www.sohbet32.Net" title="Sohbet" rel="nofollow">Sohbet</a> | <a href="http://www.muhabbetim.in" title="muhabbet" rel="nofollow">muhabbet</a> was not a decision to kill Concepts but to give it more time so that we could produce a well honed feature to include in the release of C++ after C++0x.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Rodrigo</title>
		<link>http://cpp-next.com/archive/2009/08/what-happened-in-frankfurt/comment-page-1/#comment-85</link>
		<dc:creator>Rodrigo</dc:creator>
		<pubDate>Sat, 22 Aug 2009 21:35:19 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=122#comment-85</guid>
		<description>&lt;p&gt;Yes, its easy to say that but that&#039;s why I didn&#039;t attempt to criticize Indiana&#039;s design (ID) more deeply.&lt;/p&gt;

&lt;p&gt;I consider ID more convenient than TD. In fact, my full opposition to the &quot;nothing-is-explicit&quot; or the &quot;explicit-refinement-only&quot; alternatives is because they are subsets of the ID in terms of power.&lt;/p&gt;

&lt;p&gt;However, I really hate the number of explicit concepts the ID tends to generate. I find the fact that BackInsertionContainer and friends are explicit embarassing considering they are refinements of another explicit concept: Container. If a type is explicitly told to be a Container, they should be able to automatically match the mentioned refinements. If the types are&#039;t Containers, they shouldn&#039;t.&lt;/p&gt;

&lt;p&gt;Doug came with a rationale on why it wasn&#039;t this way. My opinion is that it was a wrong decision. Other options may exist. For example, we could have: concept, auto concept, explicit concept. http://zone-team.com.mx/temp/c2.cpp summarizes my thoughts.&lt;/p&gt;

&lt;p&gt;The optimal solution is between &quot;too much explicit&quot; and &quot;explicit enough&quot;. And no, TD isn&#039;t &quot;explicit enough&quot;. ID is closer to that lower bound than TD is.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Yes, its easy to say that but that&#8217;s why I didn&#8217;t attempt to criticize Indiana&#8217;s design (ID) more deeply.</p>

<p>I consider ID more convenient than TD. In fact, my full opposition to the &#8220;nothing-is-explicit&#8221; or the &#8220;explicit-refinement-only&#8221; alternatives is because they are subsets of the ID in terms of power.</p>

<p>However, I really hate the number of explicit concepts the ID tends to generate. I find the fact that BackInsertionContainer and friends are explicit embarassing considering they are refinements of another explicit concept: Container. If a type is explicitly told to be a Container, they should be able to automatically match the mentioned refinements. If the types are&#8217;t Containers, they shouldn&#8217;t.</p>

<p>Doug came with a rationale on why it wasn&#8217;t this way. My opinion is that it was a wrong decision. Other options may exist. For example, we could have: concept, auto concept, explicit concept. <a href="http://zone-team.com.mx/temp/c2.cpp" rel="nofollow">http://zone-team.com.mx/temp/c2.cpp</a> summarizes my thoughts.</p>

<p>The optimal solution is between &#8220;too much explicit&#8221; and &#8220;explicit enough&#8221;. And no, TD isn&#8217;t &#8220;explicit enough&#8221;. ID is closer to that lower bound than TD is.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Abrahams</title>
		<link>http://cpp-next.com/archive/2009/08/what-happened-in-frankfurt/comment-page-1/#comment-84</link>
		<dc:creator>Dave Abrahams</dc:creator>
		<pubDate>Sat, 22 Aug 2009 17:44:09 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=122#comment-84</guid>
		<description>&lt;blockquote cite=&quot;comment-81&quot;&gt;

&lt;strong&gt;&lt;a href=&quot;#comment-81&quot; rel=&quot;nofollow&quot;&gt;Rodrigo&lt;/a&gt;&lt;/strong&gt;: I think the optimal solution may be somewhere between
&lt;/blockquote&gt;

&lt;p&gt;Hi Rodrigo,&lt;/p&gt;

&lt;p&gt;The question is, in between what and what?  It&#039;s very easy to say that the right answer probably lies between two competing points of view, but the proposal that was voted into the WP already has optional implicit matching (auto concepts).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<blockquote cite="comment-81">

<strong><a href="#comment-81" rel="nofollow">Rodrigo</a></strong>: I think the optimal solution may be somewhere between
</blockquote>

<p>Hi Rodrigo,</p>

<p>The question is, in between what and what?  It&#8217;s very easy to say that the right answer probably lies between two competing points of view, but the proposal that was voted into the WP already has optional implicit matching (auto concepts).</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Rodrigo</title>
		<link>http://cpp-next.com/archive/2009/08/what-happened-in-frankfurt/comment-page-1/#comment-81</link>
		<dc:creator>Rodrigo</dc:creator>
		<pubDate>Fri, 21 Aug 2009 21:53:20 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=122#comment-81</guid>
		<description>&lt;p&gt;Hi Doug.&lt;/p&gt;

&lt;p&gt;I see. I think the optimal solution may be somewhere between, but it seems it starts getting more complicated (at least without a whole redesign). Thanks for your reply.&lt;/p&gt;

&lt;p&gt;And thanks to Dave for fixing my code!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Doug.</p>

<p>I see. I think the optimal solution may be somewhere between, but it seems it starts getting more complicated (at least without a whole redesign). Thanks for your reply.</p>

<p>And thanks to Dave for fixing my code!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Abrahams</title>
		<link>http://cpp-next.com/archive/2009/08/what-happened-in-frankfurt/comment-page-1/#comment-77</link>
		<dc:creator>Dave Abrahams</dc:creator>
		<pubDate>Fri, 21 Aug 2009 19:17:37 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=122#comment-77</guid>
		<description>&lt;blockquote cite=&quot;comment-74&quot;&gt;

&lt;strong&gt;&lt;a href=&quot;#comment-74&quot; rel=&quot;nofollow&quot;&gt;Rodrigo&lt;/a&gt;&lt;/strong&gt;: this thing ate my codesee it here: &lt;a href=&quot;http://zone-team.com.mx/temp/c.cpp&quot; rel=&quot;nofollow&quot;&gt;http://zone-team.com.mx/temp/c.cpp&lt;/a&gt;
&lt;/blockquote&gt;

&lt;p&gt;Rodrigo, I think I went in and fixed the code up; does that look better?  I&#039;ll try to track down this bug.  Sorry for the inconvenience.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<blockquote cite="comment-74">

<strong><a href="#comment-74" rel="nofollow">Rodrigo</a></strong>: this thing ate my codesee it here: <a href="http://zone-team.com.mx/temp/c.cpp" rel="nofollow">http://zone-team.com.mx/temp/c.cpp</a>
</blockquote>

<p>Rodrigo, I think I went in and fixed the code up; does that look better?  I&#8217;ll try to track down this bug.  Sorry for the inconvenience.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Doug Gregor</title>
		<link>http://cpp-next.com/archive/2009/08/what-happened-in-frankfurt/comment-page-1/#comment-75</link>
		<dc:creator>Doug Gregor</dc:creator>
		<pubDate>Fri, 21 Aug 2009 15:01:47 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=122#comment-75</guid>
		<description>&lt;p&gt;Explicit concepts do not prevent implicit matching of more-specific auto concepts, so the last two lines of your example should read:&lt;/p&gt;

&lt;p&gt;&lt;pre lang=&quot;cpp&quot;&gt;
f(some_container( ));    // okay, meets the requirements of BackInsertionContainer
f(not_a_container( ));   // okay, meets the requirements of BackInsertionContainer
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;The &quot;Indiana&quot; group discussed similar examples back in 2005, and we decided that &quot;auto&quot; should really mean &quot;auto&quot;: if you match the syntax of an auto concept, it works even if there is an explicit concept as a root. ConceptGCC actually had this wrong (it&#039;s fixed now), but the specification is clear.&lt;/p&gt;

&lt;p&gt;The net effect of this behavior is that you can actually turn any explicit concept &quot;C&quot; into an auto concept with a little trick:&lt;/p&gt;

&lt;p&gt;&lt;pre lang=&quot;cpp&quot;&gt;
concept C&lt;typename T&gt; { 
  /* ... */
}

auto concept AutoC&lt;typename T&gt; : C&lt;T&gt; { }

template&lt;AutoC T&gt; concept_map C&lt;T&gt; { }
&lt;/pre&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Explicit concepts do not prevent implicit matching of more-specific auto concepts, so the last two lines of your example should read:</p>

<p>

</p>
<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">f<span style="color: #008000;">&#40;</span>some_container<span style="color: #008000;">&#40;</span> <span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>    <span style="color: #666666;">// okay, meets the requirements of BackInsertionContainer</span>
f<span style="color: #008000;">&#40;</span>not_a_container<span style="color: #008000;">&#40;</span> <span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>   <span style="color: #666666;">// okay, meets the requirements of BackInsertionContainer</span></pre></div></div>




<p>The &#8220;Indiana&#8221; group discussed similar examples back in 2005, and we decided that &#8220;auto&#8221; should really mean &#8220;auto&#8221;: if you match the syntax of an auto concept, it works even if there is an explicit concept as a root. ConceptGCC actually had this wrong (it&#8217;s fixed now), but the specification is clear.</p>

<p>The net effect of this behavior is that you can actually turn any explicit concept &#8220;C&#8221; into an auto concept with a little trick:</p>

<p>

</p>
<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">concept C<span style="color: #000080;">&lt;</span><span style="color: #0000ff;">typename</span> T<span style="color: #000080;">&gt;</span> <span style="color: #008000;">&#123;</span> 
  <span style="color: #ff0000; font-style: italic;">/* ... */</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0000ff;">auto</span> concept AutoC<span style="color: #000080;">&lt;</span><span style="color: #0000ff;">typename</span> T<span style="color: #000080;">&gt;</span> <span style="color: #008080;">:</span> C<span style="color: #000080;">&lt;</span>T<span style="color: #000080;">&gt;</span> <span style="color: #008000;">&#123;</span> <span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0000ff;">template</span><span style="color: #000080;">&lt;</span>AutoC T<span style="color: #000080;">&gt;</span> concept_map C<span style="color: #000080;">&lt;</span>T<span style="color: #000080;">&gt;</span> <span style="color: #008000;">&#123;</span> <span style="color: #008000;">&#125;</span></pre></div></div>


]]></content:encoded>
	</item>
	<item>
		<title>By: Rodrigo</title>
		<link>http://cpp-next.com/archive/2009/08/what-happened-in-frankfurt/comment-page-1/#comment-74</link>
		<dc:creator>Rodrigo</dc:creator>
		<pubDate>Fri, 21 Aug 2009 14:36:40 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=122#comment-74</guid>
		<description>&lt;p&gt;this thing ate my code 
see it here: http://zone-team.com.mx/temp/c.cpp&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>this thing ate my code 
see it here: <a href="http://zone-team.com.mx/temp/c.cpp" rel="nofollow">http://zone-team.com.mx/temp/c.cpp</a></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Rodrigo</title>
		<link>http://cpp-next.com/archive/2009/08/what-happened-in-frankfurt/comment-page-1/#comment-73</link>
		<dc:creator>Rodrigo</dc:creator>
		<pubDate>Fri, 21 Aug 2009 14:28:14 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=122#comment-73</guid>
		<description>&lt;p&gt;Hi Doug. Thanks for your answer.&lt;/p&gt;

&lt;p&gt;In my opinion explicit refinement -can&#039;t- replace explicit concepts.&lt;/p&gt;

&lt;p&gt;As I understand it, explicit refinement forbids inheritance-like implicit matching. This works for things like iterator (iterator is auto, but walking down the refinement tree can be limited in certain points). On the other hand, explicit concepts can prevent implicit matching of the root too.&lt;/p&gt;

&lt;p&gt;I think of this mechanism:&lt;/p&gt;

&lt;p&gt;&lt;pre lang=&quot;cpp&quot;&gt;

concept Container;    // explicit, this is the root of the concept tree
auto concept FrontInsertionContainer : Container;
auto concept BackInsertionContainer : Container;
// etc. unfortunately all of these are explicit in the latest draft

struct some_container { /* deque interface here */ };
struct not_a_container { /* deque interface here */ };

concept_map Container { };    // we explicitly match the root

template
void f(C);

f(some_container( ));    // ok, the root is reacheable and it meets BackInsertionContainer
f(not_a_container( ));   // bad, it may match BackInsertionContainer, but the root isn&#039;t reacheable

&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;Explicit concepts (or explicit refinement) could be used to make some inner nodes unreacheable 
unless stated otherwise. All auto-nodes can be reached if the parents can be reached.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Doug. Thanks for your answer.</p>

<p>In my opinion explicit refinement -can&#8217;t- replace explicit concepts.</p>

<p>As I understand it, explicit refinement forbids inheritance-like implicit matching. This works for things like iterator (iterator is auto, but walking down the refinement tree can be limited in certain points). On the other hand, explicit concepts can prevent implicit matching of the root too.</p>

<p>I think of this mechanism:</p>

<p>

</p>
<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">&nbsp;
concept Container<span style="color: #008080;">;</span>    <span style="color: #666666;">// explicit, this is the root of the concept tree</span>
<span style="color: #0000ff;">auto</span> concept FrontInsertionContainer <span style="color: #008080;">:</span> Container<span style="color: #008080;">;</span>
<span style="color: #0000ff;">auto</span> concept BackInsertionContainer <span style="color: #008080;">:</span> Container<span style="color: #008080;">;</span>
<span style="color: #666666;">// etc. unfortunately all of these are explicit in the latest draft</span>
&nbsp;
<span style="color: #0000ff;">struct</span> some_container <span style="color: #008000;">&#123;</span> <span style="color: #ff0000; font-style: italic;">/* deque interface here */</span> <span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span>
<span style="color: #0000ff;">struct</span> not_a_container <span style="color: #008000;">&#123;</span> <span style="color: #ff0000; font-style: italic;">/* deque interface here */</span> <span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span>
&nbsp;
concept_map Container <span style="color: #008000;">&#123;</span> <span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span>    <span style="color: #666666;">// we explicitly match the root</span>
&nbsp;
<span style="color: #0000ff;">template</span>
<span style="color: #0000ff;">void</span> f<span style="color: #008000;">&#40;</span>C<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
f<span style="color: #008000;">&#40;</span>some_container<span style="color: #008000;">&#40;</span> <span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>    <span style="color: #666666;">// ok, the root is reacheable and it meets BackInsertionContainer</span>
f<span style="color: #008000;">&#40;</span>not_a_container<span style="color: #008000;">&#40;</span> <span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>   <span style="color: #666666;">// bad, it may match BackInsertionContainer, but the root isn't reacheable</span></pre></div></div>




<p>Explicit concepts (or explicit refinement) could be used to make some inner nodes unreacheable 
unless stated otherwise. All auto-nodes can be reached if the parents can be reached.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Doug Gregor</title>
		<link>http://cpp-next.com/archive/2009/08/what-happened-in-frankfurt/comment-page-1/#comment-71</link>
		<dc:creator>Doug Gregor</dc:creator>
		<pubDate>Fri, 21 Aug 2009 06:39:12 +0000</pubDate>
		<guid isPermaLink="false">http://cpp-next.com/?p=122#comment-71</guid>
		<description>&lt;blockquote cite=&quot;comment-39&quot;&gt;

&lt;strong&gt;&lt;a href=&quot;#comment-39&quot; rel=&quot;nofollow&quot;&gt;Rodrigo&lt;/a&gt;&lt;/strong&gt;: Hi Dave and Doug!
In my opinion the current design was ok (but not perfect, member-function matching and so on). However I think the problem appeared when the conceptualization of the library started to include -too many- explicit concepts. Under that light I agree with Stroustrup; most if not almost all library concepts should remain automatic since, if we struggle hard enough, its easy to find counter-arguments against the auto-matching for every single concept we may think of.
&lt;/blockquote&gt;

&lt;p&gt;I don&#039;t think the counter-arguments are that strong. There is no dispute that, if a type accidentally matches a given auto concept, it can cause serious problems, such as the InputIterator/ForwardIterator overloading problem described in &lt;a href=&quot;http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1798.html&quot; rel=&quot;nofollow&quot;&gt;Explicit Model Definitions are Necessary&lt;/a&gt;, where the library ends up performing an incorrect optimization due to an accidental match. The argument against using explicit concepts is that the benefits of less typing (i.e., the elimination of &quot;empty concept maps&quot;) for the user outweigh the dangers of accidental matching. In part, the discussion is so heated because we&#039;re dealing with two properties that are hard to quantify:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;How often will users have to write an &quot;empty&quot; concept maps, and will they be viewed as purely syntactic noise?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How often will accidental matches occur, and will these matches result in bugs that require a significant amount of time to find and fix?&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Whether you think that a particular concept is explicit or not depends on how you answer those two questions, your tolerance for risk, and so on. From what I&#039;ve seen, people tend to overestimate the number of empty concept maps one needs to write (#1) because they forget the role of concept map templates in the development process. For example, a Graph library like the &lt;a href=&quot;http://www.boost.org/doc/libs/1_39_0/libs/graph/doc/index.html&quot; rel=&quot;nofollow&quot;&gt;Boost Graph Library&lt;/a&gt; is likely to have graph concepts (e.g., &lt;a href=&quot;http://www.boost.org/doc/libs/1_39_0/libs/graph/doc/IncidenceGraph.html&quot; rel=&quot;nofollow&quot;&gt;IncidenceGraph&lt;/a&gt;) and graph data structures (like &lt;a href=&quot;http://www.boost.org/doc/libs/1_39_0/libs/graph/doc/adjacency_list.html&quot; rel=&quot;nofollow&quot;&gt;adjacency_list&lt;/a&gt;) that match those concepts. The author of that library is going to write a concept map template in the library that says that every adjacency_list is an IncidenceGraph, because that concept map template will make sure that the concepts and data structures keep in sync (since concept map templates are fully type-checked), documents for the user that every adjacency_list is an IncidenceGraph (which would otherwise be just a comment somewhere), and eliminates the need for the user to write concept maps in the common case.&lt;/p&gt;

&lt;blockquote&gt;
The conceptualization of the standard library probably doesn’t need any explicit concepts (explicit refinement as Stroustrup calls it could solve those special cases). But getting rid of explicit concepts completely, as I see it, was an extreme alternative.
&lt;/blockquote&gt;

&lt;p&gt;Well, we clearly have to do -something- about the InputIterator/ForwardIterator problem I mentioned previously (as well as the RandomAccessIterator/ContiguousIterator problem Stroustrup uses to describe explicit refinement). I&#039;ve seen this same problem show up in most of the other C++ generic libraries I&#039;ve worked on, so it doesn&#039;t seem to be an isolated example. Explicit concepts are one obvious way to solve this problem.&lt;/p&gt;

&lt;p&gt;I don&#039;t know whether explicit refinement solves the problem as well as explicit concepts or not. The discussion of explicit refinement on the committee mailing list ran for more than 200 messages, and participants weren&#039;t clear about how explicit refinement really worked. Under some interpretations, it had certain type-safety problems where a type could be a ContiguousIterator in one call but only a RandomAccessIterator in another call. Under other interpretations, explicit refinement was just an alternative syntax with the same semantics as explicit concepts. Without a more detailed specification, we can&#039;t really meaningfully evaluate explicit refinement: there are just too many open questions.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<blockquote cite="comment-39">

<strong><a href="#comment-39" rel="nofollow">Rodrigo</a></strong>: Hi Dave and Doug!
In my opinion the current design was ok (but not perfect, member-function matching and so on). However I think the problem appeared when the conceptualization of the library started to include -too many- explicit concepts. Under that light I agree with Stroustrup; most if not almost all library concepts should remain automatic since, if we struggle hard enough, its easy to find counter-arguments against the auto-matching for every single concept we may think of.
</blockquote>

<p>I don&#8217;t think the counter-arguments are that strong. There is no dispute that, if a type accidentally matches a given auto concept, it can cause serious problems, such as the InputIterator/ForwardIterator overloading problem described in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1798.html" rel="nofollow">Explicit Model Definitions are Necessary</a>, where the library ends up performing an incorrect optimization due to an accidental match. The argument against using explicit concepts is that the benefits of less typing (i.e., the elimination of &#8220;empty concept maps&#8221;) for the user outweigh the dangers of accidental matching. In part, the discussion is so heated because we&#8217;re dealing with two properties that are hard to quantify:</p>

<ol>
<li><p>How often will users have to write an &#8220;empty&#8221; concept maps, and will they be viewed as purely syntactic noise?</p></li>
<li><p>How often will accidental matches occur, and will these matches result in bugs that require a significant amount of time to find and fix?</p></li>
</ol>

<p>Whether you think that a particular concept is explicit or not depends on how you answer those two questions, your tolerance for risk, and so on. From what I&#8217;ve seen, people tend to overestimate the number of empty concept maps one needs to write (#1) because they forget the role of concept map templates in the development process. For example, a Graph library like the <a href="http://www.boost.org/doc/libs/1_39_0/libs/graph/doc/index.html" rel="nofollow">Boost Graph Library</a> is likely to have graph concepts (e.g., <a href="http://www.boost.org/doc/libs/1_39_0/libs/graph/doc/IncidenceGraph.html" rel="nofollow">IncidenceGraph</a>) and graph data structures (like <a href="http://www.boost.org/doc/libs/1_39_0/libs/graph/doc/adjacency_list.html" rel="nofollow">adjacency_list</a>) that match those concepts. The author of that library is going to write a concept map template in the library that says that every adjacency_list is an IncidenceGraph, because that concept map template will make sure that the concepts and data structures keep in sync (since concept map templates are fully type-checked), documents for the user that every adjacency_list is an IncidenceGraph (which would otherwise be just a comment somewhere), and eliminates the need for the user to write concept maps in the common case.</p>

<blockquote>
The conceptualization of the standard library probably doesn’t need any explicit concepts (explicit refinement as Stroustrup calls it could solve those special cases). But getting rid of explicit concepts completely, as I see it, was an extreme alternative.
</blockquote>

<p>Well, we clearly have to do -something- about the InputIterator/ForwardIterator problem I mentioned previously (as well as the RandomAccessIterator/ContiguousIterator problem Stroustrup uses to describe explicit refinement). I&#8217;ve seen this same problem show up in most of the other C++ generic libraries I&#8217;ve worked on, so it doesn&#8217;t seem to be an isolated example. Explicit concepts are one obvious way to solve this problem.</p>

<p>I don&#8217;t know whether explicit refinement solves the problem as well as explicit concepts or not. The discussion of explicit refinement on the committee mailing list ran for more than 200 messages, and participants weren&#8217;t clear about how explicit refinement really worked. Under some interpretations, it had certain type-safety problems where a type could be a ContiguousIterator in one call but only a RandomAccessIterator in another call. Under other interpretations, explicit refinement was just an alternative syntax with the same semantics as explicit concepts. Without a more detailed specification, we can&#8217;t really meaningfully evaluate explicit refinement: there are just too many open questions.</p>]]></content:encoded>
	</item>
</channel>
</rss>
