I haven't has a chance to look at the C++ standard, and there might be reasons or cases where this is okay. If the compiler guarantees to inline a function, the storage for the "local" notionally becomes local to the caller, so it could potentially be okay in some cases. However, g++ warns about these inline operators, and from looking at the unoptimised output they are not being inlined and the code emitted explicitly returns null.
This is worth bearing in mind for people who are porting the source to other toolchains.
I haven't has a chance to look at the C++ standard, and there might be reasons or cases where this is okay. If the compiler guarantees to inline a function, the storage for the "local" notionally becomes local to the caller, so it could potentially be okay in some cases. However, g++ warns about these inline operators, and from looking at the unoptimised output they are not being inlined and the code emitted explicitly returns null.
This is worth bearing in mind for people who are porting the source to other toolchains.