Added move constructor/operator

This commit is contained in:
jim 2022-11-16 11:33:16 -08:00 committed by Chris Thrasher
parent 0bdefd25d7
commit 1d4db22d62
2 changed files with 15 additions and 2 deletions

View File

@ -111,6 +111,19 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
Shader& operator=(const Shader&) = delete; Shader& operator=(const Shader&) = delete;
////////////////////////////////////////////////////////////
/// \brief Defaulted move constructor
///
////////////////////////////////////////////////////////////
Shader(Shader&&) noexcept = default;
////////////////////////////////////////////////////////////
/// \brief Defaulted move assignment
///
////////////////////////////////////////////////////////////
Shader& operator=(Shader&&) noexcept = default;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Load the vertex, geometry or fragment shader from a file /// \brief Load the vertex, geometry or fragment shader from a file
/// ///

View File

@ -4,5 +4,5 @@
static_assert(!std::is_copy_constructible_v<sf::Shader>); static_assert(!std::is_copy_constructible_v<sf::Shader>);
static_assert(!std::is_copy_assignable_v<sf::Shader>); static_assert(!std::is_copy_assignable_v<sf::Shader>);
static_assert(!std::is_nothrow_move_constructible_v<sf::Shader>); static_assert(std::is_nothrow_move_constructible_v<sf::Shader>);
static_assert(!std::is_nothrow_move_assignable_v<sf::Shader>); static_assert(std::is_nothrow_move_assignable_v<sf::Shader>);