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
Microsoft/GSL not_null has an implicit conversion from T to not_null which doesn't follow the guidelines explicit conversions. However, making it explicit as the guidelines direct causes problems including being too verbose to use.
The text was updated successfully, but these errors were encountered:
Editors' call: This set of issues deserves a new look at whether not_null should be a general type, a type that works only on raw pointers, or an alias. GDR will write a note.
Let me express my humble opinion. I think that the not_null semantics is needed not only for raw pointers but also for smart pointers. And it should be consistent: if it is possible to create a shared_ptr from a unique_ptr, then it should be possible to create a not_null<shared_ptr> from a not_null<unique_ptr> and so on.
I researched this subject more deeply and wrote the C++ Object Token Library. Maybe it will help make decisions about the design of the gsl::not_null.
#379 #399 #509
see also #225
Microsoft/GSL not_null has an implicit conversion from T to not_null which doesn't follow the guidelines explicit conversions. However, making it explicit as the guidelines direct causes problems including being too verbose to use.
The text was updated successfully, but these errors were encountered: