mirror of
https://github.com/microsoft/GSL.git
synced 2026-01-25 08:32:21 +01:00
introduce gsl::not_null<T>::element_type (#1196)
* introduce gsl::not_null<T>::element_type * use std::is_same instead of is_same_v * fix: cannot put a non-pointer in a gsl::not_null
This commit is contained in:
@@ -88,4 +88,10 @@ TEST(pointers_test, swap)
|
||||
"!SwapCompilesFor<NotMoveAssignableCustomPtr>");
|
||||
}
|
||||
|
||||
TEST(pointers_test, member_types)
|
||||
{
|
||||
static_assert(std::is_same<gsl::not_null<int*>::element_type, int*>::value,
|
||||
"check member type: element_type");
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user