PDA

View Full Version : Is it now legal to use QString inside of a catch block?



RolandHughes
9th July 2014, 18:17
The title says it all. Has the C++ standard moved sufficiently to allow a QString to be returned from a function which populates it inside of the catch portion of a try/catch block? This never used to compile but today someone at a client site and it not only compiled, it worked. Was this just happenstance or has the standard changed that much? You used to not be able to do dynamic memory allocation inside a catch block and QString allocates a buffer, hence my question.

Thanks