Been I while since I dealt with these things in C++, if my memory doesn't elude me, there's a problem when taking const* from the internals of temporary variables. The object is deleted, but since the memory hasn't been overwritten this works in 99.99% of the cases.

I'm not 100% certain this is the case here. But if I remember the C++ standard correctly the only exception is the scope extension of a const reference. Mind you, it's been a few years since the last time a touched upon these issues, so I'm a bit rusty.

If you know more about this please advice.