Good day!

Consider

// - - - -
class Foo{}
auto one = new Foo();
auto two = new Foo();
writefln("one: %x  two: %x", &one.classinfo, &two.classinfo);
// - - - -

For me this results in two identical memory addresses "every time".

Can I rely on this?
Can I design software based on the assumption that these addresses are always 
the same?

(I'd like to be able to use the memory address as the key in an associative 
array, for quick by-class
lookups.)


BR
/heywood

Reply via email to