diff --git a/include/SFML/System/FileInputStream.hpp b/include/SFML/System/FileInputStream.hpp index 30079fb0..875a18c4 100644 --- a/include/SFML/System/FileInputStream.hpp +++ b/include/SFML/System/FileInputStream.hpp @@ -83,13 +83,13 @@ public: /// \brief Move constructor /// //////////////////////////////////////////////////////////// - FileInputStream(FileInputStream&&); + FileInputStream(FileInputStream&&) noexcept; //////////////////////////////////////////////////////////// /// \brief Move assignment /// //////////////////////////////////////////////////////////// - FileInputStream& operator=(FileInputStream&&); + FileInputStream& operator=(FileInputStream&&) noexcept; //////////////////////////////////////////////////////////// /// \brief Open the stream from a file path diff --git a/src/SFML/System/FileInputStream.cpp b/src/SFML/System/FileInputStream.cpp index 2f919ec2..63e65582 100644 --- a/src/SFML/System/FileInputStream.cpp +++ b/src/SFML/System/FileInputStream.cpp @@ -52,11 +52,11 @@ FileInputStream::~FileInputStream() = default; //////////////////////////////////////////////////////////// -FileInputStream::FileInputStream(FileInputStream&&) = default; +FileInputStream::FileInputStream(FileInputStream&&) noexcept = default; //////////////////////////////////////////////////////////// -FileInputStream& FileInputStream::operator=(FileInputStream&&) = default; +FileInputStream& FileInputStream::operator=(FileInputStream&&) noexcept = default; //////////////////////////////////////////////////////////// diff --git a/test/System/FileInputStream.test.cpp b/test/System/FileInputStream.test.cpp index e8fac557..384d51fa 100644 --- a/test/System/FileInputStream.test.cpp +++ b/test/System/FileInputStream.test.cpp @@ -6,8 +6,14 @@ #include #include #include +#include #include +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 std::string getTemporaryFilePath() { static int counter = 0;