mirror of
https://github.com/microsoft/GSL.git
synced 2025-04-02 09:18:33 -04:00
fix: cannot put a non-pointer in a gsl::not_null
This commit is contained in:
parent
61dec915f2
commit
c23616aec9
@ -90,7 +90,7 @@ TEST(pointers_test, swap)
|
|||||||
|
|
||||||
TEST(pointers_test, member_types)
|
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");
|
"check member type: element_type");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -369,7 +369,7 @@ TEST(strict_notnull_tests, TestStrictNotNull)
|
|||||||
TEST(pointers_test, member_types)
|
TEST(pointers_test, member_types)
|
||||||
{
|
{
|
||||||
// make sure `element_type` is inherited from `gsl::not_null`
|
// 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");
|
"check member type: element_type");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user