I have an std::vector<IRenderable*>
(_pBkBuffer
in the code below). It contains a number of static objects (at the start of the vector) that don't change, followed by a variable number of dynamic objects.
// erase-remove, but leave the static renderables intact
_pBkBuffer->erase(
std::remove(
_pBkBuffer->begin() + _nStatics, _pBkBuffer->end(), ???
),
_pBkBuffer->end()
);
What can I put at the ??? in order to erase-remove the non-static renderables?
I know that the ??? should match all objects in the specified subset.
Should I be using erase-remove at all, or should I use another approach?