P
Parapura Rajkumar
int main(int argc, char* argv[])
{
std::map<int, int>::iterator footest;
{
std::map<int, int> foo;
foo[0] = 0;
footest = foo.begin();
}
return 0;
}
Is this undefined behavior? Please note that footest is going out of
scope before std::map. In theory an implementation could have a
iterator destructor that could still access the std::map ?
Thanks
Raj
{
std::map<int, int>::iterator footest;
{
std::map<int, int> foo;
foo[0] = 0;
footest = foo.begin();
}
return 0;
}
Is this undefined behavior? Please note that footest is going out of
scope before std::map. In theory an implementation could have a
iterator destructor that could still access the std::map ?
Thanks
Raj