Boost C++ Libraries: Ticket #8483: Fix for reference type deduction in join_iterator.hpp https://svn.boost.org/trac10/ticket/8483 <p> Changeset 70041 introduced a better reference type deduction for join_iterators (<a class="ext-link" href="https://svn.boost.org/trac/boost/changeset/70041"><span class="icon">​</span>https://svn.boost.org/trac/boost/changeset/70041</a>) that was originally proposed by my colleague aschoedl. </p> <p> The deduction contains a bug however that (I think) the attached patch fixes </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8483 Trac 1.4.3 stheophil@… Mon, 22 Apr 2013 14:55:24 GMT attachment set https://svn.boost.org/trac10/ticket/8483 https://svn.boost.org/trac10/ticket/8483 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">join_iterator_original.hpp.patch</span> </li> </ul> Ticket Nathan Ridge Thu, 30 May 2013 22:15:38 GMT <link>https://svn.boost.org/trac10/ticket/8483#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8483#comment:1</guid> <description> <p> Could you please give an example of a piece of code that doesn't work as expected without this fix? </p> <p> Thanks! </p> </description> <category>Ticket</category> </item> <item> <author>stheophil@…</author> <pubDate>Mon, 19 Aug 2013 15:07:24 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8483#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8483#comment:2</guid> <description> <p> I'm sorry it took so long for me to respond. The problem is easy to replicate: </p> <pre class="wiki">typedef boost::join_iterator&lt; std::vector&lt;int&gt;::const_iterator, std::vector&lt;int&gt;::iterator &gt; JoinIterator; static_assert( std::is_same&lt; typename JoinIterator::reference, int const&amp; &gt;::value, "" ); </pre><p> The static_assert should not trigger but it does with the old implementation of join_iterator (using Visual Studio 2012). add_const&lt; int&amp; &gt;::type is still int&amp;. We need to remove the reference first, then add const then re-add the reference. (Or find an altogether better solution :-) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Nathan Ridge</dc:creator> <pubDate>Tue, 20 Aug 2013 06:06:13 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8483#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8483#comment:3</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/85400" title="[range] Fixed a bug in join_iterator where joining a const range and a ...">[85400]</a>) [range] Fixed a bug in join_iterator where joining a const range and a non-const range led to a compiler error (refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8483" title="#8483: Bugs: Fix for reference type deduction in join_iterator.hpp (closed: fixed)">#8483</a>). </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Nathan Ridge</dc:creator> <pubDate>Tue, 20 Aug 2013 06:08:26 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8483#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8483#comment:4</guid> <description> <p> Thanks! Fixed in trunk. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Neil Groves</dc:creator> <pubDate>Fri, 21 Feb 2014 20:39:27 GMT</pubDate> <title>owner changed https://svn.boost.org/trac10/ticket/8483#comment:5 https://svn.boost.org/trac10/ticket/8483#comment:5 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Neil Groves</span> to <span class="trac-author">Nathan Ridge</span> </li> </ul> <p> Hi Nathan! I see you have fixed this in the trunk. When you are happy would you please merge this to release and then close this ticket? </p> Ticket Nathan Ridge Sat, 22 Feb 2014 06:30:04 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/8483#comment:6 https://svn.boost.org/trac10/ticket/8483#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> I have already merged it to the 'master' branch in git: <a class="ext-link" href="https://github.com/boostorg/range/commit/4c2898345972bd6c44c6b55abb386af931cc8fb5"><span class="icon">​</span>https://github.com/boostorg/range/commit/4c2898345972bd6c44c6b55abb386af931cc8fb5</a>. I guess I need to close the bug manually now that we use git (with svn I would put "fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8483" title="#8483: Bugs: Fix for reference type deduction in join_iterator.hpp (closed: fixed)">#8483</a>" in the commit message of the merge and it would auto-close the bug). </p> Ticket