id summary reporter owner description type status milestone component version severity resolution keywords cc 5547 boost::range::join ambiguous with boost::algorithm::join chris.byrne@… Neil Groves "= Summary = Calling boost::join with an iterator range when both boost algorithm and boost range join.jpp headers have been included, introduces an ambiguity with Visual Studio 2010. = Steps to Reproduce = {{{ #include #include #include int main() { std::vector< int > vec1; std::vector< int > vec2; boost::join( vec1, boost::make_iterator_range( vec2.begin(), vec2.end() ) ); return 0; } }}} = Expected Results = Code to compile and do nothing. = Actual Results = `main.cpp(16): error C2668: 'boost::range::join' : ambiguous call to overloaded function` `boost\range\join.hpp(65): could be 'boost::range::join` `boost\algorithm\string\join.hpp(46): or 'boost::algorithm::join'` = Notes = boost::algorithm::join is pulled into the boost namespace with a using declaration. boost::join is defined directly in the boost namespace by the range library meaning I can't explicitly refer to it. Current workaround is to move boost::join into boost::range::join, and then pull it into the boost namespace with a using declaration. {{{ namespace range { join(SinglePassRange1& r1, SinglePassRange2& r2); } // namespace range using range::join; }}} Allowing the example code to be resolved by being more explicit: {{{ boost::range::join( vec1, boost::make_iterator_range( vec2.begin(), vec2.end() ) ); }}} " Bugs closed To Be Determined range Boost 1.46.1 Problem fixed