I'd like to create two containers that contain iterators to each other. I'd like to do this hopefully without introducing any intermediate/indirect types. Is this possible or do iterator types depending on knowing the size of the container's data type?
Here is some sample code that I'd like to get compiling:
#include <map>
#include <deque>
#include <string>
class mapvalue_t
{
public:
std::deque< std::map<std::string,mapvalue_t>::iterator >::iterator i;
};
typedef std::map<std::string,mapvalue_t> maptype_t;
typedef std::deque< maptype_t::iterator > queuetype_t;
int main(void)
{
maptype_t m;
queuetype_t q;
}
Never mind, it compiles now. I had a queue there, rather than my intended deque :)