[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
- Re: What tests are run by patchy?, (continued)
- Re: What tests are run by patchy?, David Kastrup, 2013/08/23
- Re: What tests are run by patchy?, Frédéric Bron, 2013/08/23
- Re: What tests are run by patchy?, David Kastrup, 2013/08/23
- Re: What tests are run by patchy?, Frédéric Bron, 2013/08/23
- Re: What tests are run by patchy?,
David Kastrup <=
- Premature Optimization, Dan Eble, 2013/08/24
- Re: Premature Optimization, Frédéric Bron, 2013/08/24