G
gusfonseca
Is it safe to assume an object's address remains the same for the
duration of a program, once it is constructed?
For exemple, may i create a std::map<&my_class, char> and expect to
get the same 'char' upon passing an object's address ( my_char =
my_map[ my_pointer_to_object ] )?
If it is safe, is it also advisable to do so, or is it "evil" in some
way?
duration of a program, once it is constructed?
For exemple, may i create a std::map<&my_class, char> and expect to
get the same 'char' upon passing an object's address ( my_char =
my_map[ my_pointer_to_object ] )?
If it is safe, is it also advisable to do so, or is it "evil" in some
way?