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
Therefore, it is not possible to extract (the potentially expensive) ptr_ anymore for non-copy constructible types once a gsl::not_null< T > is constructed around it. Wouldn't it make sense to use ref-qualified member methods for both methods (i.e. conversion operator and get)?
@gdr-at-ms Can you investigate the decision made by gsl-lite to see if there is any way we can add constraints to add a sufficient conversion operator while not introducing any ambiguities?
gsl::not_null< T >
has the following conversion operator:which is deleted for non-copy constructible types such as
std::unique_ptr
due togsl::not_null< T >
's conditional return type mapping toconst T&
:Therefore, it is not possible to extract (the potentially expensive)
ptr_
anymore for non-copy constructible types once agsl::not_null< T >
is constructed around it. Wouldn't it make sense to use ref-qualified member methods for both methods (i.e. conversion operator andget
)?The text was updated successfully, but these errors were encountered: