Ambiguous C++ compiler error
The following bit of code fails to compile. The error seems to be some kind of ambigous call to the merge routine. My understanding is that STL has a merge routine found in the std namespace, but as far as I can tell the name merge in the code below should be unique. If I rename merge to xmerge, everything works. What could the problem be? where is the name clash coming from? http://codepad.org/uAKciGy5 #include <iostream> #include <iterator> #include <vector> template<typename InputIterator1, typename InputIterator2, typename OutputIterator> void merge(const InputIterator1 begin1, const