Boost C++ Libraries: Ticket #3998: Provide light weight headers for extensibility features of BOOST_FOREACH https://svn.boost.org/trac10/ticket/3998 <p> To provide specialization as written in <a href="http://www.boost.org/doc/libs/1_42_0/doc/html/foreach/extensibility.html">documentation</a>, now users have to include the whole boost/foreach.hpp which is a somewhat heavy header, especially when BOOST_FOREACH is actually not used. </p> <p> This patch extracts the extensibility interface to two new headers: </p> <ul><li>boost/foreach_extensibility_fwd.hpp: This includes only forward declations used by the extensibility features. </li><li>boost/foreach_extensibility.hpp: This includes also definition of the extensibility features. </li></ul><p> Please take care to use "svn copy" from boost/foreach.hpp to create both two new headers to preserve the history. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3998 Trac 1.4.3 Kazutoshi Satoda <k_satoda@…> Thu, 11 Mar 2010 15:18:54 GMT attachment set https://svn.boost.org/trac10/ticket/3998 https://svn.boost.org/trac10/ticket/3998 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">foreach_separate_headers_for_extensibility.patch</span> </li> </ul> <p> svn diff for trunk <a class="changeset" href="https://svn.boost.org/trac10/changeset/60445" title="m">r60445</a> </p> Ticket Eric Niebler Wed, 09 Jun 2010 14:51:16 GMT status changed https://svn.boost.org/trac10/ticket/3998#comment:1 https://svn.boost.org/trac10/ticket/3998#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> Although I don't see a need to put the implementation of is_lightweight_proxy and is_noncopyable in their own header, putting forward declarations for them in a separate header is a good suggestion. </p> Ticket Eric Niebler Wed, 09 Jun 2010 14:52:56 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3998#comment:2 https://svn.boost.org/trac10/ticket/3998#comment:2 <ul> <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-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/62661" title="add foreach_fwd.hpp for forward declarations of foreach's ...">[62661]</a>) add foreach_fwd.hpp for forward declarations of foreach's customization points, fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3998" title="#3998: Patches: Provide light weight headers for extensibility features of BOOST_FOREACH (closed: wontfix)">#3998</a> </p> Ticket Kazutoshi Satoda <k_satoda@…> Thu, 24 Jun 2010 21:51:44 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/3998#comment:3 https://svn.boost.org/trac10/ticket/3998#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <blockquote class="citation"> <p> Although I don't see a need to put the implementation of ... </p> </blockquote> <p> I'm sorry to have forgotten to put a link, but my another patch <a class="reopened ticket" href="https://svn.boost.org/trac10/ticket/3996" title="#3996: Patches: Enable use of BOOST_FOREACH over const-ref of noncopyable ptr_containers (reopened)">#3996</a> (for ptr_container) depends on the separation. </p> <p> Could you please re-evaluate the separation? </p> Ticket Eric Niebler Thu, 24 Jun 2010 21:57:24 GMT <link>https://svn.boost.org/trac10/ticket/3998#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3998#comment:4</guid> <description> <p> What exactly is the problem you're experiencing? It's perfectly legal to specialize a template that has only been forward-declared, so the foreach_fwd.hpp should be all you need. If it's not, can you tell me what compiler/version you're using, send me the error message you're getting and code I can use to reproduce the problem? Thanks. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Eric Niebler</dc:creator> <pubDate>Thu, 24 Jun 2010 22:11:33 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3998#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3998#comment:5</guid> <description> <p> I looked more closely at your patch for <a class="reopened ticket" href="https://svn.boost.org/trac10/ticket/3996" title="#3996: Patches: Enable use of BOOST_FOREACH over const-ref of noncopyable ptr_containers (reopened)">#3996</a> and see the problem. For every instantiation of reversible_ptr_container, you are instantiating foreach::is_noncopyable to (optionally) inherit from noncopyable. This is the wrong way to do it and will lead to ODR violations when different translation units see different specializations of foreach::is_noncopyable. Instead, define a partial specialization of foreach::is_noncopyable&lt; reversible_ptr_container&lt;...&gt; &gt; as you first suggested. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Eric Niebler</dc:creator> <pubDate>Thu, 24 Jun 2010 22:12:25 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3998#comment:6 https://svn.boost.org/trac10/ticket/3998#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> </ul> Ticket