Roll our own qUtf8Printable()?
Berthold Stoeger
bstoeger at mail.tuwien.ac.at
Sun Feb 25 22:49:39 PST 2018
On Montag, 26. Februar 2018 02:33:58 CET Thiago Macieira wrote:
> > [Sidenote: There's a reason the C++-standard disallows reference counting
> > for its string class.]
>
> There is, but this isn't it. The concern is the unexpected memory allocation
> when calling a non-const function. The standard banned reference counting
> by requiring a few of those functions to have constant time (O(1))
> operation, which can't be implemented if you need to allocate memory and
> memcpy.
That's how they do it, but certainly not the only reason why they do it. There
are also concerns about thread safety and - I'm quite sure - code
optimization.
But this should be of no concern to us - since we don't use std::string.
Berthold
More information about the subsurface
mailing list