I am iterating through a vector with
std::vector<std::string>::reverse_iterator ritr;
I need to at some point find out if a string in this vector is an operator using the function
bool IsOperator(const std::string s);
When I call the function following way,
if(IsOperator(*ritr))
eclipse complains!
Candidates are:
bool IsOperator(char)
bool IsOperator(std::basic_string<char,std::char_traits<char>,std::allocator<char>>)
(I have an overloaded function with accepts char instead of std::string)
However, it allows the operation of storing the deferenced iterator in a string
std::string str= *ritr;
What am I missing here?
std::vector<string>::iterator, the compiler should have no trouble disambiguating between those two functions. Also, are you saying compilation fails, or is it Eclipse CDT's parser that's showing red squiggles?