On Thu, 2012-02-16 at 15:20 -0500, Kohei Yoshida wrote: > > Is it a safe code? > > > > pForbiddenCharacters = &maMap[ nLanguage ]; > > return pForbiddenCharacters; ... > So, in theory, taking the address of a returned object which itself is a > reference to the instance stored in the container is very much safe.
I guess :-) I imagine the real problem here is that any kind of operation on the stl container could then realloc the underlying memory in some way, busting the reference / pointer you handed out elsewhere; so it looks only transiently safe to me ;-) Or perhaps I'm missing something, ATB, Michael. -- michael.me...@suse.com <><, Pseudo Engineer, itinerant idiot _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice