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
This is consistent with what we've done for the base() members of iterator adaptors in C++20, to support move-only iterators.
Should the const& one really return a reference though? My gut feeling is that for this type both should return by value, although I haven't given it much thought.
This issue had come up in gsl-lite as well, and we decided to always return a value type from implicit conversion operators. The reasons are discussed in the comment here:
An issue raised on the Microsoft/GSL that requests a conversion operator on
gsl::not_null
for non-copy constructible types (microsoft/GSL#991).Would the Guidelines editors like to see something like this added for
gsl::not_null
?The text was updated successfully, but these errors were encountered: