diff --git a/include/SFML/Window/Cursor.hpp b/include/SFML/Window/Cursor.hpp index 5f540b048..9d20f2500 100644 --- a/include/SFML/Window/Cursor.hpp +++ b/include/SFML/Window/Cursor.hpp @@ -141,6 +141,18 @@ public: //////////////////////////////////////////////////////////// Cursor& operator=(const Cursor&) = delete; + //////////////////////////////////////////////////////////// + /// \brief Move constructor + /// + //////////////////////////////////////////////////////////// + Cursor(Cursor&&) noexcept = default; + + //////////////////////////////////////////////////////////// + /// \brief Move assignment + /// + //////////////////////////////////////////////////////////// + Cursor& operator=(Cursor&&) noexcept = default; + //////////////////////////////////////////////////////////// /// \brief Create a cursor with the provided image /// diff --git a/test/Window/Cursor.test.cpp b/test/Window/Cursor.test.cpp index 9fab29502..aafe6b26e 100644 --- a/test/Window/Cursor.test.cpp +++ b/test/Window/Cursor.test.cpp @@ -8,8 +8,8 @@ static_assert(!std::is_copy_constructible_v); static_assert(!std::is_copy_assignable_v); -static_assert(!std::is_nothrow_move_constructible_v); -static_assert(!std::is_nothrow_move_assignable_v); +static_assert(std::is_nothrow_move_constructible_v); +static_assert(std::is_nothrow_move_assignable_v); // Skip these tests because they fail when using DRM which hasn't implemented sf::Cursor TEST_CASE("[Window] sf::Cursor" * doctest::skip(true))