https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71010

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Ubikovich from comment #3)
> But since C++14 cbegin invoke std::begin:
> 
> // http://en.cppreference.com/w/cpp/iterator/begin
> template< class C >
> constexpr auto cbegin( const C& c ) -> decltype(std::begin(c));
> (3)           (since C++14)
> 
> Then in what namespace should be user-defined begin/end?

I already explained how to do it correctly, please read comment 1 again.



(In reply to Andrew Pinski from comment #4)
> In the same as the class so ADR (argument dependent resolution) can find it.

N.B. that should be ADL (argument dependent *lookup*).

Reply via email to