I've got iterator through undefined type:
for (typename Type::const_iterator hayStackIterator = hayHeap.begin(); hayStackIterator != hayHeap.end(); ++hayStackIterator) {
//some inner logic
}
and it would be nice, to know what type is my *hayStackIterator
to be able to modify the inner logic pursuant this information... Is there some simple function to make something like this?
if (*hayStackIterator.isInstanceOf(vector<string>){
//do something
} else if (*hayStackIterator.isInstanceOf(string){
//do something else
}
I can use these includes
:
#include <cctype>
#include <iostream>
#include <iomanip>
#include <set>
#include <list>
#include <map>
#include <vector>
#include <queue>
#include <string>