http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52458

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-03-02 
12:39:03 UTC ---
It works ok if you do the conversion to the base class explicitly:

      for (int x: static_cast<std::vector<int>&>(*this)) { }

I think the range-for code needs to do overload resolution in the class' scope,
but it fails to and tries to say the begin/end members are protected, then gets
into trouble while trying to print the error message.

Reply via email to