Boost C++ Libraries: Ticket #12158: boost::size() and friends should use an ADL barrier like boost::begin https://svn.boost.org/trac10/ticket/12158 <p> boost::begin() and boost::end() are nicely declared in an ADL barrier namespace to avoid conflicts with code like this: </p> <pre class="wiki">using std::begin; auto i = begin(c); </pre><p> <a class="ext-link" href="http://isocpp.org/files/papers/n4280.pdf"><span class="icon">​</span>N4280</a> has been accepted into C++17, which adds std::size, std::empty, and std::data. But if users attempt to use those in the same way: </p> <pre class="wiki">using std::size; auto s = size(c); </pre><p> They may get an error. For example, if c is a std::vector&lt;boost::shared_ptr&lt;int&gt;&gt; or something, boost::size() will be found by ADL, and since it's no more specific than std::size, the call will be ambiguous. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12158 Trac 1.4.3 Neil Groves Tue, 26 Apr 2016 21:55:11 GMT status changed https://svn.boost.org/trac10/ticket/12158#comment:1 https://svn.boost.org/trac10/ticket/12158#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket