Taken from C++ Erase vector element by value rather than by position?
The answer states that if you have a vector of int's you can use the erase-remove idiom to remove an element by it's value like so:
vec.erase(std::remove(vec.begin(), vec.end(), 8), vec.end());
Where 8 is an element in the list.
My question is, using this same technique is it possible to remove a pointer element with a pointer as a value like so:
std::vector<T*> m_list;
T* value;
m_list.erase(std::remove(m_list.begin(), m_list.end(), value), m_list.end());
Given that "value" is an element in the list.