Given std::vector<A>::iterator
and std::map<A, B>::iterator
, how do I explicitly call their destructors? I do not know the actual names of these types, because the ::iterator
member types are typedefs/aliases to implementation-specific classes.
I ask this question, because I am storing these iterators in an unrestricted c++ union and Visual Studio asks me to manually handle destruction. I could simply not call the destructor of the active element and assume iterators do not need clean-up, but that reeks of bad practice.