--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
This is just context, not an objection to banning these features.Banning 'noexcept' has caused some problems inside Google because vector<T> optimizes better if T's move constructor is marked noexcept. On the other hand, the clang team is motivated to find some way to deal with that, without adding code to all move constructors.
On Wed, Sep 24, 2014 at 4:30 PM, Peter Kasting <pkas...@google.com> wrote:
> On Wed, Sep 24, 2014 at 4:27 PM, Jeffrey Yasskin <jyas...@chromium.org>
> wrote:
>>
>> This is just context, not an objection to banning these features.
>>
>> Banning 'noexcept' has caused some problems inside Google because
>> vector<T> optimizes better if T's move constructor is marked noexcept. On
>> the other hand, the clang team is motivated to find some way to deal with
>> that, without adding code to all move constructors.
>
>
> If the compiler is told that exceptions are disabled, shouldn't that
> effectively imply "noexcept" everywhere, at least for optimization purposes?
One would think that. ;-)
Internal bug 15770138 for any googlers who want to follow along. Sorry
everyone else. :-/
I recently found out that one cannot use resize() on a vector of noncopyable (but movable) type
due to missing noexcept on move constructor. We had to use pop_back()'s.
On Wednesday, September 24, 2014 at 5:07:59 PM UTC-7, Peter Kasting wrote:On Wed, Sep 24, 2014 at 5:02 PM, Jeffrey Yasskin <jyas...@chromium.org> wrote:On Wed, Sep 24, 2014 at 4:30 PM, Peter Kasting <pkas...@google.com> wrote:
> On Wed, Sep 24, 2014 at 4:27 PM, Jeffrey Yasskin <jyas...@chromium.org>
> wrote:
>>
>> This is just context, not an objection to banning these features.
>>
>> Banning 'noexcept' has caused some problems inside Google because
>> vector<T> optimizes better if T's move constructor is marked noexcept. On
>> the other hand, the clang team is motivated to find some way to deal with
>> that, without adding code to all move constructors.
>
>
> If the compiler is told that exceptions are disabled, shouldn't that
> effectively imply "noexcept" everywhere, at least for optimization purposes?
One would think that. ;-)
Internal bug 15770138 for any googlers who want to follow along. Sorry
everyone else. :-/Oh, there are cases on there I hadn't considered. Ugh.If we really wanted, I would support an explicit style-guide exception that says noexcept can be used in cases where doing so produces a meaningful performance win, with some background on when and why that might be.PK
--
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
There is official wording for noexcept being added to the Google standard. It is in review right now, actually.In the mean time, they said go ahead with noexcept on move ctors.
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
This performance win could actually be gained in many other places as well. These other places have not been approved.
[chromium-style] Complex constructor has an inlined body.
HistoryInfoMapValue(HistoryInfoMapValue&& other) = default;
It seems like I can't make nothrow_move_constructible. What should I do?
Hi!
Recently I've encountered a problem. I was trying to write a noexcept move constructor.
At first I did it like this (I'm keeping the name to show the error message):
*.h
HistoryInfoMapValue(HistoryInfoMapValue&& other) noexcept;*.ccHistoryInfoMapValue::HistoryInfoMapValue(HistoryInfoMapValue&& other) noexcept = default;
On mac it compiles, but I get an error while compiling android_compile_dbg.
error: function 'HistoryInfoMapValue::HistoryInfoMapValue(HistoryInfoMapValue&&)' defaulted on its redeclaration with an exception-specification that differs from the implicit declaration 'HistoryInfoMapValue::HistoryInfoMapValue(HistoryInfoMapValue&&)' HistoryInfoMapValue::HistoryInfoMapValue(HistoryInfoMapValue&& other) noexcept =If I declare it inline that the noexcept specification will be deduced by the compiler but I get an error:[chromium-style] Complex constructor has an inlined body.
HistoryInfoMapValue(HistoryInfoMapValue&& other) = default;
It seems like I can't make nothrow_move_constructible. What should I do?
четверг, 25 сентября 2014 г., 2:24:12 UTC+3 пользователь Peter Kasting написал:
What: Ban exception features, e.g. noexcept, exception_ptr, etc.Why: These are banned by the Google style guide. They aren't necessary in Chromium since we don't use exceptions.Detail: I don't see any reason to leave these on the "TBD" list. Banning them seems safe and keeps us consistent with the Google style guide.PK
--
Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_comp...)