mirror of
https://github.com/TartanLlama/optional.git
synced 2025-08-02 03:14:26 +02:00
Fix warnings
This commit is contained in:
@@ -32,8 +32,8 @@ TEST_CASE("Triviality", "[bases.triviality]") {
|
|||||||
struct T {
|
struct T {
|
||||||
T(const T&){}
|
T(const T&){}
|
||||||
T(T&&) {};
|
T(T&&) {};
|
||||||
T& operator=(const T&) {}
|
T& operator=(const T&) { return *this; }
|
||||||
T& operator=(T&&) {};
|
T& operator=(T&&) { return *this; };
|
||||||
~T(){}
|
~T(){}
|
||||||
};
|
};
|
||||||
REQUIRE(!std::is_trivially_copy_constructible<tl::optional<T>>::value);
|
REQUIRE(!std::is_trivially_copy_constructible<tl::optional<T>>::value);
|
||||||
|
@@ -80,7 +80,7 @@ TEST_CASE("Noexcept", "[noexcept]") {
|
|||||||
struct throw_move_assign {
|
struct throw_move_assign {
|
||||||
throw_move_assign() = default;
|
throw_move_assign() = default;
|
||||||
throw_move_assign(throw_move_assign &&){};
|
throw_move_assign(throw_move_assign &&){};
|
||||||
throw_move_assign &operator=(const throw_move_assign &) {}
|
throw_move_assign &operator=(const throw_move_assign &) { return *this; }
|
||||||
};
|
};
|
||||||
|
|
||||||
using nothrow_opt = tl::optional<nothrow_move_assign>;
|
using nothrow_opt = tl::optional<nothrow_move_assign>;
|
||||||
|
Reference in New Issue
Block a user