Skip to content

Commit

Permalink
fix static_assert
Browse files Browse the repository at this point in the history
  • Loading branch information
ericLemanissier committed Apr 9, 2019
1 parent e4059cc commit c8020de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/notnull_tests.cpp
Expand Up @@ -440,7 +440,7 @@ TEST_CASE("TestNotNullUniquePtrComparison") {
CHECK(p->i == NotNull1(std::make_unique<UniquePointerTestStruct>())->i);
}
}
static_assert(!std::is_assignable<not_null<std::unique_ptr<int>>, std::unique_ptr<int>>::value, "not_null<std::unique_ptr> must be non assignable from std:unique_ptr");
static_assert(!std::is_assignable<not_null<std::unique_ptr<int>>, std::unique_ptr<int>&>::value, "not_null<std::unique_ptr> must be non assignable from std:unique_ptr lvalues");
static_assert(!std::is_copy_constructible<not_null<std::unique_ptr<int>>>::value, "not_null<std::unique_ptr> must be non copy constructible");
static_assert(!std::is_copy_assignable<not_null<std::unique_ptr<int>>>::value, "not_null<std::unique_ptr> must be non copy assignable");
static_assert(std::is_nothrow_move_constructible<not_null<std::unique_ptr<int>>>::value, "not_null<std::unique_ptr> must be no-throw move constructible");
Expand Down Expand Up @@ -492,7 +492,7 @@ TEST_CASE("TestNotNullSharedPtrValueComparison") {
CHECK(p->i == NotNull1(std::make_shared<UniquePointerTestStruct>())->i);
}
}
static_assert(!std::is_assignable<not_null<std::shared_ptr<int>>, std::shared_ptr<int>>::value, "not_null<std::shared_ptr> must be non assignable from std::shared_ptr");
static_assert(!std::is_assignable<not_null<std::shared_ptr<int>>, std::shared_ptr<int>&>::value, "not_null<std::shared_ptr> must be non assignable from std::shared_ptr lvalues");
static_assert(std::is_copy_constructible<not_null<std::shared_ptr<int>>>::value, "not_null<std::shared_ptr> must be copy constructible");
static_assert(std::is_copy_assignable<not_null<std::shared_ptr<int>>>::value, "not_null<std::shared_ptr> must be copy assignable");
static_assert(std::is_nothrow_move_constructible<not_null<std::shared_ptr<int>>>::value, "not_null<std::shared_ptr> must be no-throw move constructible");
Expand Down

0 comments on commit c8020de

Please sign in to comment.