Add `noexcept` to move constructors and move assignment operators
refs #2966
Change-Id: Ib87da2b8dc2d77fa9beb8bc6b5323498057b76a2
diff --git a/src/util/signal-scoped-connection.cpp b/src/util/signal-scoped-connection.cpp
index a0f2d1c..1b1fb95 100644
--- a/src/util/signal-scoped-connection.cpp
+++ b/src/util/signal-scoped-connection.cpp
@@ -25,6 +25,11 @@
namespace util {
namespace signal {
+#if NDN_CXX_HAVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE
+static_assert(std::is_nothrow_move_constructible<ScopedConnection>::value,
+ "ScopedConnection must be MoveConstructible with noexcept");
+#endif // NDN_CXX_HAVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE
+
ScopedConnection::ScopedConnection()
{
}
@@ -34,7 +39,7 @@
{
}
-ScopedConnection::ScopedConnection(ScopedConnection&& other)
+ScopedConnection::ScopedConnection(ScopedConnection&& other) noexcept
: m_connection(other.m_connection)
{
other.release();