Boost C++ Libraries: Ticket #11528: MSVS 2015 + boost::range: STL and Boost iterators https://svn.boost.org/trac10/ticket/11528 <p> The attached test program compiled with MSVS 2013, but doesn't with MSVS2015 in debug mode and Boost-trunk as of 2015-08-05. The <code>transform_iterator</code> is recognised as Boost foward iterator, but only as STL input iterator because its reference type is <code>int</code>. Since <code>boost::max_element</code> uses <code>std::max_element</code>, it doesn't compile in debug mode with: </p> <pre class="wiki">c:\program files (x86)\microsoft visual studio 14.0\vc\include\xutility(1005): error C2338: next requires forward iterator </pre><p> I'd be happy if this code compiled and worked, or if otherwise the Boost assertion would fire because the transform iterator is not a Boost forward traversal iterator. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11528 Trac 1.4.3 Dennis Schneider <dsr@…> Thu, 06 Aug 2015 14:16:46 GMT attachment set https://svn.boost.org/trac10/ticket/11528 https://svn.boost.org/trac10/ticket/11528 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test.cpp</span> </li> </ul> <p> Code in question </p> Ticket Dennis Schneider <dsr@…> Thu, 06 Aug 2015 14:17:04 GMT attachment set https://svn.boost.org/trac10/ticket/11528 https://svn.boost.org/trac10/ticket/11528 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test-compile.txt</span> </li> </ul> <p> Compiler output </p> Ticket Michel Morin Thu, 20 Aug 2015 11:14:51 GMT <link>https://svn.boost.org/trac10/ticket/11528#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11528#comment:1</guid> <description> <p> A possible fix would be to replace <code>std::max_element</code> with <code>boost::first_max_element</code> (in '&lt;boost/algorithm/minmax_element.hpp&gt;'). I'll make a PR on github soon. </p> <p> The problems are still remaining for other algorithms that require more than <code>InputIterator</code> (of the standard iterator categories), though. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 08 Jun 2016 12:50:37 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11528#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11528#comment:2</guid> <description> <p> Hello, is there some update on this issue? I'm using Boost 1.60.0 and my project doesn't build with VS2015 debug mode with the same error message. Is it fixed in more recent boost releases? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Michel Morin</dc:creator> <pubDate>Thu, 09 Jun 2016 12:52:21 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11528#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11528#comment:3</guid> <description> <p> <a class="ext-link" href="https://github.com/boostorg/range/pull/34"><span class="icon">​</span>PR</a> was merged to 'develop' branch, but not merged to 'master' branch. So it is not yet fixed in the released versions of Boost. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 28 Feb 2017 15:03:14 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11528#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11528#comment:4</guid> <description> <p> Alternatively to using boost::first_max_element (it has some different signatures), one can substitute boost::range::min_element(x) with boost::range::min_element(x, std::greater&lt;type_of_x&gt;()). Useful if some input range has to be transformed. I didn't have such issues with min_element. </p> </description> <category>Ticket</category> </item> </channel> </rss>