[Development] Why can't QString use UTF-8 internally?

Thiago Macieira thiago.macieira at intel.com
Wed Feb 11 02:25:07 CET 2015


On Wednesday 11 February 2015 01:59:40 Olivier Goffart wrote:
> Unless it is a buffer of std::atomic, it is an undefined behavior, so not
> only the contents of the buffer is unpredictable, but anything, really.
> 
> (A sufficiently smart conforming compiler could see that you are writing at
> the same location without proper synchronization and conclude that you are
> not using threads and optimize away all the other locks)
> 
> (This is getting a bit out of topic)

Unless there are out-of-thin-air values, I don't see how a UB could kick in 
and I don't think atomics are necessary.

See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4323.html - 
"Out-of-Thin-Air Execution is Vacuous"

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list