Boost C++ Libraries: Ticket #6357: Resolve ambiguity for unqualified call to begin/end https://svn.boost.org/trac10/ticket/6357 <p> On 12/16/2011 10:44 AM, Nathan Ridge wrote: </p> <blockquote class="citation"> <p> Hello, </p> <p> I am running into a problem where an unqualified call to begin() on a range type whose template parameters include a Boost.Phoenix type (for examle filtered_range&lt;Pred, R&gt; where Pred is a phoenix function) is ambiguous because, in addition to the intended std::begin, phoenix::begin is being found by ADL. </p> <p> What can be done about this? There exists precedent for placing boost::xxx::begin/end functions in ADL barrier namespaces because C++11 encourages unqualified calls to begin/end (specifically, this was done for boost::range::begin/end). Should the same thing be done for Phoenix? </p> <p> Here is a minimal example that reproduces the problem: </p> </blockquote> <pre class="wiki">#include&lt;iterator&gt; #include&lt;boost/range/adaptor/filtered.hpp&gt; #include&lt;boost/phoenix/phoenix.hpp&gt; using std::begin; {{{ int main() { using boost::phoenix::arg_names::arg1; using boost::adaptors::filtered; int v[5]; const auto&amp; f = v | filtered(arg1&lt; 0); begin(f); } }}} </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6357 Trac 1.4.3 Fernando Pelliccioni <fpelliccioni@…> Mon, 09 Jan 2012 18:06:52 GMT <link>https://svn.boost.org/trac10/ticket/6357#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6357#comment:1</guid> <description> <p> Fix in Ticket <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6360" title="#6360: Patches: Patch for &#34;begin/end ambiguity&#34; (closed: fixed)">#6360</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Nathan Ridge</dc:creator> <pubDate>Tue, 05 Mar 2013 08:11:36 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6357#comment:2 https://svn.boost.org/trac10/ticket/6357#comment:2 <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> Ticket