I have a header file. In this header I want to use a map for a class. But after I include I get a no matching function error, because I have a copy() function in the project(really big project). I saw on this website http://www.sgi.com/tech/stl/download.html that map contains a using std::copy so I guess it collides with that.
I cannot make any changes to the copy function, so is there a way I can use map in this header file ? (no other place). Is there a way so my copy functions don’t collide ?
I use Visual Studio 2008 on Windows 7.
The error message suggests that your function is not visible to the translation unit, so make sure you include the header.
Also, I doubt
<map>has anything likeusing std::copy. You sure about this one?In
algobase.h(which is not standard C++), theusingdirectives are parsed only if__STL_USE_NAMESPACESis defined. You should undefine it before including the header: