id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 8668,BOOST_FOREACH breaks on clang 3.2 but not on gcc 4.7.2,juxeii@…,Eric Niebler,"Consider this snippet: {{{ #include #include class A : public std::vector { public: template operator const T &() const; }; void foo(){ A colA; int b = 1; BOOST_FOREACH(b, colA) { ; } } }}} clang 3.2 throws this error: {{{ error: conditional expression is ambiguous; 'rvalue_probe' can be converted to 'A' and vice versa BOOST_FOREACH(b, colA) expanded from macro 'BOOST_FOREACH' f (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_col) = BOOST_FOREACH_CONTAIN(COL)) expanded from macro 'BOOST_FOREACH_CONTAIN' BOOST_FOREACH_EVALUATE(COL) expanded from macro 'BOOST_FOREACH_EVALUATE' (true ? boost::foreach_detail_::make_probe((COL), BOOST_FOREACH_ID(_foreach_is_rvalue)) : (COL)) }}} gcc in version 4.7.2 compiles this snippet with no error. Is this a bug of gcc, clang or boost? ",Bugs,closed,To Be Determined,foreach,Boost 1.52.0,Problem,wontfix,,