In the book 'C++ In A Nutshell', there is the following example code
std::vector<int> data
...
std::erase(std::remove(data.begin(), data.end(), 42),
data.end());
I thought that 'erase' was a member function, so shouldn't that be 'data.erase' rather than 'std::erase'? Is there some way the c++ compiler can tell what member you wanted to call a member function on, or did the book omit any documentation of an erase template function, or is the example wrong?