I have a strange memory corruption to a std::map when using the std::map.find function and was hoping to get some advice. I am using 64-bit windows XP and compiling my code with ICL to generate 64-bit DLLs.
Code snippet:
my_instance_ptr has a member std::map my_map <std::string, My_Obj_Type *>.
my_instance_ptr->get ("name") leads to a function call to my_map.find ("name"). This my_map.find call works correctly and results a NIL since the map is empty.
I subsequently (in the very next line) call a function
my_instance_ptr->register <MyType> ("name") leads to a function call to my_map.find ("name"). This my_map.find call throws an exception while searching through the tree even though the map is empty.
The difference between the prototype "get" and "register" is
I did try to remove the default arguments from the register function but that did not change the behavior and the my_map.find still throws an exception. I appreciate any comments/suggestions that you may have.