You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the guidelines' current position on adding "useful" methods to not_null to support ease-of-use for more general "nullable" types?
A recent issue in the ms-gsl repo microsoft/GSL#1039 is asking whether gsl::not_null can be made to support operator() for std::function.
Two similar issues existed in the ms-gsl repo in the past, but were closed due to not_null being only for pointers-to-objects and for standard smart pointers.
However, it seems that the guidelines now define gsl::not_null more generally as
not_null // T is usually a pointer type (e.g., not_null<int*> and not_null<owner<Foo*>>) that must not be nullptr. T can be any type for which ==nullptr is meaningful.
The text was updated successfully, but these errors were encountered:
What is the guidelines' current position on adding "useful" methods to
not_null
to support ease-of-use for more general "nullable" types?A recent issue in the ms-gsl repo microsoft/GSL#1039 is asking whether
gsl::not_null
can be made to supportoperator()
forstd::function
.Two similar issues existed in the ms-gsl repo in the past, but were closed due to
not_null
being only for pointers-to-objects and for standard smart pointers.However, it seems that the guidelines now define
gsl::not_null
more generally asThe text was updated successfully, but these errors were encountered: