This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] Less noexcept


Hi,

On 9/23/13 2:23 PM, Marc Glisse wrote:
On Mon, 23 Sep 2013, Paolo Carlini wrote:

On 9/23/13 10:55 AM, Marc Glisse wrote:
Hello,

this patch was tested on x86_64 with a bootstrap and a simple make -k check, without regression. Note that it doesn't completely fix 56166, it
merely admits that we may currently throw and avoids turning that into
std::terminate.
Of course.

Patch basically Ok, can you be a little less terse in the comments before the noexcepts which you are removing and in fact must be there for conformance, aren't just QoI? Point to an existing bug, when it exists, like 56166, add a FIXME C++11 at least.

Like this?
Yes.
It is funny that with fully dynamic strings, the copy constructor is "better" than the move constructor: faster, doesn't throw, etc. I think we should remove the move constructor in that case, or at least make it act the same as the copy constructor. I didn't mark the copy constructor as noexcept, but without checking the code it seems likely we could.
We could, but in my opinion fiddling with those isn't worth the trouble, because the whole "fully dynamic string" thing is just a workaround for issues of the current reference counted implementation vs the statically allocated empty string on some targets.
Also, __versa_string actually has the same issues as basic_string, if you choose the reference counted base...
Indeed, that's known. That base can't implement the C++11 specs, not surprising because it predates those by many years, when reference counted implementations weren't ruled out by the working draft. At that time I found it useful anyway to compare performance (without the burden of the alignment issues of our normal reference counted implementation)
I guess I have to do a patch to remove noexcept there now :-(
I would recommend not wasting time on that right now. Really eventually we'll only have the short-string-optimized version as our string implementation.
Has someone started work on some branch to get a real C++11 basic_string, or are we waiting until the "lack of manpower" argument convinces everyone to forget about trying to preserve any ABI compatibility?
It's just versa_string with fixed short-string-optimized base. It will replace basic_string when we break the ABI, that is, probably in the next release series, when the new ABI checking framework will be ready (if you are curious about it, you can find a talk in the material of the last Cauldron, by Benjamin, Jason, Dodji)

Thanks,
Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]