id summary reporter owner description type status milestone component version severity resolution keywords cc 7988 [Coroutine] Support for C++11 range-for is missing ld olli "Using a snapshot of the upcoming GCC 4.8 release and Boost 1.53, the following does not compile: {{{#!cpp #include int main() { using coro = boost::coroutines::coroutine; for(int i: coro { [](coro::caller_type& yield) { yield(42); } }) { // unused static_cast(i); } } }}} As far as I can tell, this is because while Boost.Coroutine does provide functionality for e.g. boost::begin(c) and boost::end(c), it does not provide for the similar, ADL-enabled uses like begin(c) and end(c), where begin and end are in scope. As it so happens, boost::begin and boost::end do ADL on behalf of the users -- their Standard counterparts do not, and a range-for statement is specified to make use of unqualified calls to begin and end. To substantiate my hypothesis, adding begin and end function templates in e.g. namespace boost::coroutines does appear to make the previous snippet compile, and more involved examples behave as expected. {{{#!cpp // Try adding this: namespace boost { namespace coroutines { template auto begin(coroutine& c) -> decltype(boost::begin(c)) { return boost::begin(c); } template auto end(coroutine& c) -> decltype(boost::end(c)) { return boost::end(c); } } } }}}" Bugs closed To Be Determined coroutine Boost 1.53.0 Problem fixed