Commit e4b5d6ed authored by Jose Dapena Paz's avatar Jose Dapena Paz Committed by Commit Bot

GCC: default move constructor of ServiceWorkerRunningInfo noexcept requires...

GCC: default move constructor of ServiceWorkerRunningInfo noexcept requires StrongAlias noexcept too.

Fix for this GCC compilation error:
../../content/public/browser/service_worker_running_info.cc:26:1: error: function ‘content::ServiceWorkerRunningInfo::ServiceWorkerRunningInfo(content::ServiceWorkerRunningInfo&&)’ defaulted on its redeclaration with an exception-specification that differs from the implicit exception-specification ‘’
   26 | ServiceWorkerRunningInfo::ServiceWorkerRunningInfo(
      | ^~~~~~~~~~~~~~~~~~~~~~~~

Problem comes from blink::ServiceWorkerToken move constructor being declared
noexcept, but its parent StrongAlias not having noexcept.

Fix making StrongAlias move constructor noexcept too.

Bug: 819294
Change-Id: I127a435b3d1f52f01a40700457ce6e67d5d67af2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2359077Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/master@{#800495}
parent 92e70e52
...@@ -70,7 +70,8 @@ class StrongAlias { ...@@ -70,7 +70,8 @@ class StrongAlias {
public: public:
constexpr StrongAlias() = default; constexpr StrongAlias() = default;
constexpr explicit StrongAlias(const UnderlyingType& v) : value_(v) {} constexpr explicit StrongAlias(const UnderlyingType& v) : value_(v) {}
constexpr explicit StrongAlias(UnderlyingType&& v) : value_(std::move(v)) {} constexpr explicit StrongAlias(UnderlyingType&& v) noexcept
: value_(std::move(v)) {}
constexpr UnderlyingType& value() & { return value_; } constexpr UnderlyingType& value() & { return value_; }
constexpr const UnderlyingType& value() const& { return value_; } constexpr const UnderlyingType& value() const& { return value_; }
......
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