I have the following class:
template<typename T>
class List {
void Add(T& item) {//GOOD STUFF}
void Add(T item) {//More STUFF}
void Remove(T item) {//STUFF}
};
I am trying to use it like the following
List<MyClass> list;
MyClass obj;
list.Add(obj); //Here the compiler gets angry :((
Regarding the question I have already found the following three SO questions, but I am still not able to call either of the methods.
Ambiguous call with overloaded r-value reference function
function call ambiguity with pointer, reference and constant reference parameter
Ambiguous Reference/Value Versions of Functions