fix: cannot put a non-pointer in a gsl::not_null

This commit is contained in:
Carson Radtke 2025-02-11 13:55:02 -06:00
parent 61dec915f2
commit c23616aec9
2 changed files with 2 additions and 2 deletions

View File

@ -90,7 +90,7 @@ TEST(pointers_test, swap)
TEST(pointers_test, member_types)
{
static_assert(std::is_same<gsl::not_null<int>::element_type, int>::value,
static_assert(std::is_same<gsl::not_null<int*>::element_type, int*>::value,
"check member type: element_type");
}

View File

@ -369,7 +369,7 @@ TEST(strict_notnull_tests, TestStrictNotNull)
TEST(pointers_test, member_types)
{
// make sure `element_type` is inherited from `gsl::not_null`
static_assert(std::is_same<gsl::strict_not_null<int>::element_type, int>::value,
static_assert(std::is_same<gsl::strict_not_null<int*>::element_type, int*>::value,
"check member type: element_type");
}