I have the following class definition:
template <typename T>
class SeqVisitor {
public:
typedef string* return_type;
return_type visit(int elem) const;
return_type visit(char elem) const;
return_type visit(T elem) const;
};
When I use SeqVisitor<char>
a call to visit is ambiguous. If I were define the functions outside of the class definition a call to that function wouldn't be ambiguous. The compiler would choose the one with
with "char elem" over "T elem". Can fix my class definition so that it will exhibit the same behavior. That is get rid of the ambiguity.