Boost C++ Libraries: Ticket #816: duplicat initial members -> erase_key postcond. fail https://svn.boost.org/trac10/ticket/816 <pre class="wiki">has_key&lt;erase_key&lt;set&lt;T,T&gt;,T&gt;::type&gt;type::value==true in violation of Postcondition on http://www.boost.org/libs/mpl/doc/refmanual/erase-key.html . </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/816 Trac 1.4.3 cppljevans Thu, 22 Mar 2007 11:34:11 GMT <link>https://svn.boost.org/trac10/ticket/816#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/816#comment:1</guid> <description> <pre class="wiki">Logged In: YES user_id=24558 Originator: YES The attached file has assoc_item template showing how to check for duplicates using a boost concept template. Although it can only be compiled with Doug's variadic template compiler, the method used to check for duplicates can, AFAICT, be used with the current m_item and s_item templates in the current mpl library. This is because the method used just uses a slight variation of the static value_by_key which the current mpl assoc containers already use. File Added: cons_inherit_check_test.cpp </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Marshall Clow</dc:creator> <pubDate>Sun, 19 Aug 2007 15:37:44 GMT</pubDate> <title>component, description changed; severity set https://svn.boost.org/trac10/ticket/816#comment:2 https://svn.boost.org/trac10/ticket/816#comment:2 <ul> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">mpl</span> </li> <li><strong>description</strong> modified (<a href="/trac10/ticket/816?action=diff&amp;version=2">diff</a>) </li> <li><strong>severity</strong> → <span class="trac-field-new">Problem</span> </li> </ul> Ticket cppljevans@… Mon, 01 Jun 2009 13:36:10 GMT attachment set https://svn.boost.org/trac10/ticket/816 https://svn.boost.org/trac10/ticket/816 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">assoc_by_insert.cpp</span> </li> </ul> <p> solution using superclass which is fold over insert op </p> Ticket anonymous Mon, 01 Jun 2009 13:43:41 GMT <link>https://svn.boost.org/trac10/ticket/816#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/816#comment:3</guid> <description> <p> The previous comment referring to assoc_item was from: </p> <p> <a class="ext-link" href="https://sourceforge.net/tracker/?func=detail&amp;atid=207586&amp;aid=1642614&amp;group_id=7586"><span class="icon">​</span>https://sourceforge.net/tracker/?func=detail&amp;atid=207586&amp;aid=1642614&amp;group_id=7586</a> </p> <p> The recent assoc_by_insert.cpp attachment shows simpler solution which folds over the set insert operation instead of the set s_item operation in the superclass of set&lt;T1,T2,...,Tn&gt; The reason it works is because the fold starts from the empty set, which has no duplicates, and the insert operation preserves the no duplicate invariant. </p> </description> <category>Ticket</category> </item> <item> <author>cppljevans@…</author> <pubDate>Mon, 01 Jun 2009 16:27:46 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/816 https://svn.boost.org/trac10/ticket/816 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">set.rst</span> </li> </ul> <p> Solution which just adds warning in docs </p> Ticket cppljevans@… Mon, 01 Jun 2009 16:33:03 GMT <link>https://svn.boost.org/trac10/ticket/816#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/816#comment:4</guid> <description> <p> The just attached set.rst is another solution which just adds a warning to the docs. </p> <p> This set.rst is a replacement for that in libs/mpl/doc/src/refmanual/set.rst. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Aleksey Gurtovoy</dc:creator> <pubDate>Mon, 21 Feb 2011 09:48:15 GMT</pubDate> <title>status, resolution changed; cc, milestone set https://svn.boost.org/trac10/ticket/816#comment:5 https://svn.boost.org/trac10/ticket/816#comment:5 <ul> <li><strong>cc</strong> <span class="trac-author">agurtovoy@…</span> added </li> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> → <span class="trac-field-new">Boost 1.46.0</span> </li> </ul> <p> Added a corresponding note and example to the docs. </p> Ticket