Commit f9f46063 authored by Simon Zünd's avatar Simon Zünd Committed by Commit Bot

[base] Add V8_NOEXCEPT to deleted constructors and assignment ops

Compiling without -fno-exceptions causes compilation errors, this
CL fixes that.

The reason for the compilation error is a mismatch of "V8_NOEXCEPT"
on mixins for base::Optional where it is not present for deleted
copy/move constructors, but present on base::Optional for defaulted
ones.

Bug: v8:8985
Change-Id: I54af77496657fde44292c050221d11533a54db03
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1518175
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60261}
parent 52b22fdf
......@@ -304,7 +304,7 @@ struct CopyConstructible {};
template <>
struct CopyConstructible<false> {
constexpr CopyConstructible() = default;
constexpr CopyConstructible(const CopyConstructible&) = delete;
constexpr CopyConstructible(const CopyConstructible&) V8_NOEXCEPT = delete;
constexpr CopyConstructible(CopyConstructible&&) V8_NOEXCEPT = default;
CopyConstructible& operator=(const CopyConstructible&) V8_NOEXCEPT = default;
CopyConstructible& operator=(CopyConstructible&&) V8_NOEXCEPT = default;
......@@ -317,7 +317,7 @@ template <>
struct MoveConstructible<false> {
constexpr MoveConstructible() = default;
constexpr MoveConstructible(const MoveConstructible&) V8_NOEXCEPT = default;
constexpr MoveConstructible(MoveConstructible&&) = delete;
constexpr MoveConstructible(MoveConstructible&&) V8_NOEXCEPT = delete;
MoveConstructible& operator=(const MoveConstructible&) V8_NOEXCEPT = default;
MoveConstructible& operator=(MoveConstructible&&) V8_NOEXCEPT = default;
};
......@@ -330,7 +330,7 @@ struct CopyAssignable<false> {
constexpr CopyAssignable() = default;
constexpr CopyAssignable(const CopyAssignable&) V8_NOEXCEPT = default;
constexpr CopyAssignable(CopyAssignable&&) V8_NOEXCEPT = default;
CopyAssignable& operator=(const CopyAssignable&) = delete;
CopyAssignable& operator=(const CopyAssignable&) V8_NOEXCEPT = delete;
CopyAssignable& operator=(CopyAssignable&&) V8_NOEXCEPT = default;
};
......@@ -343,7 +343,7 @@ struct MoveAssignable<false> {
constexpr MoveAssignable(const MoveAssignable&) V8_NOEXCEPT = default;
constexpr MoveAssignable(MoveAssignable&&) V8_NOEXCEPT = default;
MoveAssignable& operator=(const MoveAssignable&) V8_NOEXCEPT = default;
MoveAssignable& operator=(MoveAssignable&&) = delete;
MoveAssignable& operator=(MoveAssignable&&) V8_NOEXCEPT = delete;
};
// Helper to conditionally enable converting constructors and assign operators.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment