I'm writing this template class and one of the template functions you pass a std::set to of a template type which then returns one of the elements in the set (which is of course a template type). I have wrote it and it compiles fine, however when i cant seem to use the function correctly without the compiler giving an error. Here is what im trying to do.
This is the template stuff
Now how do i use the above function? This is what i have currently got:
const myType& PickElement (cont std::set<myType>& mySet) const
// returns one of the elements in the set
std::set<MyEnum> enumSet ;
MyEnum res ;
res = PickElement<MyEnum>(enumSet) ;
Doing a full rebuild resulted in a different error:
The compiler generates the following error:
Thanks for any help
error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'MyEnum'