mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Add const_pointer_cast
This commit is contained in:
parent
fcdff2f205
commit
b10edad451
@ -196,6 +196,7 @@ private:
|
||||
};
|
||||
|
||||
template<class T, class U> not_null<T> static_pointer_cast(not_null<U> const & ptr) { return not_null<T>{static_cast<T>(ptr.get())}; }
|
||||
template<class T, class U> not_null<T> const_pointer_cast(not_null<U> const & ptr) { return not_null<T>{const_cast<T>(ptr.get())}; }
|
||||
|
||||
} // namespace gsl
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user