QPointer: mark converting assignment operators noexcept
All operations they perform (copy/move construction + swap()) are noexcept, so these functions should be noexcept, too. Amends 93019dc0dee3dd3d568775250e3fae8eda072850 and (FIXME)93019dc0dee3dd3d568775250e3fae8eda072850(ONCE MERGED). Change-Id: I9010f87f93ce3efcefd8b28d848a3eadd6e74542 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
b6c7335635
commit
2b8e1a706e
|
|
@ -44,14 +44,14 @@ public:
|
|||
: wp(other.wp.internalData(), true) {}
|
||||
|
||||
template <typename X, if_convertible<X> = true>
|
||||
QPointer &operator=(const QPointer<X> &other)
|
||||
QPointer &operator=(const QPointer<X> &other) noexcept
|
||||
{
|
||||
QPointer(other).swap(*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename X, if_convertible<X> = true>
|
||||
QPointer &operator=(QPointer<X> &&other)
|
||||
QPointer &operator=(QPointer<X> &&other) noexcept
|
||||
{
|
||||
QPointer(std::move(other)).swap(*this);
|
||||
return *this;
|
||||
|
|
|
|||
Loading…
Reference in New Issue