Boost C++ Libraries: Ticket #4051: [range][string_algo] Conflict between algorithm names https://svn.boost.org/trac10/ticket/4051 <p> When I try to include both Boost.Range algorithms (in the current trunk version) and Boost.Algorithm, using a file such as the following: </p> <pre class="wiki">#include &lt;boost/algorithm/string.hpp&gt; #include &lt;boost/range/algorithm.hpp&gt; </pre><p> I receive several errors about duplicate definitions. I am using gcc 4.1.2 on Linux. </p> <pre class="wiki">./boost/range/algorithm/find.hpp:28: error: ‘template&lt;class SinglePassRange, class Value&gt; typename boost::range_iterator::type boost::find(SinglePassRange&amp;, const Value&amp;)’ conflicts with previous using declaration ‘template&lt;class RangeT, class FinderT&gt; boost::iterator_range&lt;typename boost::range_iterator&lt;C&gt;::type&gt; boost::algorithm::find(RangeT&amp;, const FinderT&amp;)’ ./boost/range/algorithm/lexicographical_compare.hpp:28: error: ‘template&lt;class SinglePassRange1, class SinglePassRange2&gt; bool boost::lexicographical_compare(const SinglePassRange1&amp;, const SinglePassRange2&amp;)’ conflicts with previous using declaration ‘template&lt;class Range1T, class Range2T&gt; bool boost::algorithm::lexicographical_compare(const Range1T&amp;, const Range2T&amp;)’ ./boost/range/algorithm/lexicographical_compare.hpp:42: error: ‘template&lt;class SinglePassRange1, class SinglePassRange2, class BinaryPredicate&gt; bool boost::lexicographical_compare(const SinglePassRange1&amp;, const SinglePassRange2&amp;, BinaryPredicate)’ conflicts with previous using declaration ‘template&lt;class Range1T, class Range2T, class PredicateT&gt; bool boost::algorithm::lexicographical_compare(const Range1T&amp;, const Range2T&amp;, PredicateT)’ </pre><p> The using declarations mentioned in the error message are in files such as boost/algorithm/string/find.hpp. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4051 Trac 1.4.3 Jeremiah Willcock Mon, 29 Mar 2010 19:49:41 GMT owner, component changed https://svn.boost.org/trac10/ticket/4051#comment:1 https://svn.boost.org/trac10/ticket/4051#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Thorsten Ottosen</span> to <span class="trac-author">Pavol Droba</span> </li> <li><strong>component</strong> <span class="trac-field-old">range</span> → <span class="trac-field-new">string_algo</span> </li> </ul> Ticket Neil Groves Sat, 03 Apr 2010 21:19:02 GMT <link>https://svn.boost.org/trac10/ticket/4051#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4051#comment:2</guid> <description> <p> I have altered Boost.Range to implement the range algorithms in the namespace boost::range. These are then brought into the boost namespace with a using statement. For some algorithms this should mean that the overloads can be resolved, but in the cases that the functions are ambiguous the user can easily add algorithm:: or range:: to disambiguate. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Marshall Clow</dc:creator> <pubDate>Wed, 28 Dec 2011 18:53:28 GMT</pubDate> <title>owner, component changed https://svn.boost.org/trac10/ticket/4051#comment:3 https://svn.boost.org/trac10/ticket/4051#comment:3 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Pavol Droba</span> to <span class="trac-author">Marshall Clow</span> </li> <li><strong>component</strong> <span class="trac-field-old">string_algo</span> → <span class="trac-field-new">algorithm</span> </li> </ul> Ticket Marshall Clow Sun, 01 Jan 2012 21:40:58 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4051#comment:4 https://svn.boost.org/trac10/ticket/4051#comment:4 <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> Just tried this with the latest release branch (coming up to 1.49), and I don't get any errors: </p> <pre class="wiki">#include &lt;boost/algorithm/string.hpp&gt; #include &lt;boost/range/algorithm.hpp&gt; int main (int argc, const char * argv[]) { return 0; } </pre><p> Closing this ticket. If you have more information/problems, please re-open. </p> Ticket