lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What tests are run by patchy?


From: David Kastrup
Subject: Re: What tests are run by patchy?
Date: Fri, 23 Aug 2013 15:50:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Frédéric Bron <address@hidden> writes:

>> const string & as return type is madness.  For one thing, it's
>> guaranteed _not_ to be an efficiency gain in C++11.  For another, it
>> produces _serious_ destructor/lifetime issues.
>
> Of course I am not speaking of new strings created in the function!
> That would be stupid. But if you return a member of an object for
> example, it is stupid to return a copy of it (I do not know if this
> happens, however).

Not every object is persistent.  Again: references create life-time
issues.  Messing with them, particularly in the case of a basic
conceptually scalar data structure like "string" only makes some remote
sense when there is positive proof that there is a serious performance
impact for known implementations.

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]