Provides ported functions/classes from gsl/pointers.
Adapted from the Guidelines Support Library v2.0.0. at https://github.com/Microsoft/GSL
- Author
- Mark Abraham mark..nosp@m.j.ab.nosp@m.raham.nosp@m.@gma.nosp@m.il.co.nosp@m.m
|
template<class T > |
not_null< T > | gmx::compat::make_not_null (T &&t) |
| Convenience function for making not_null pointers from plain pointers.
|
|
template<class T > |
not_null< typename T::pointer > | gmx::compat::make_not_null (T &t) |
| Convenience function for making not_null pointers from smart pointers.
|
|
|
template<class T , class U > |
auto | gmx::compat::operator== (const not_null< T > &lhs, const not_null< U > &rhs) -> decltype(lhs.get()==rhs.get()) |
| Operators to compare not_null pointers.
|
|
template<class T , class U > |
auto | gmx::compat::operator!= (const not_null< T > &lhs, const not_null< U > &rhs) -> decltype(lhs.get()!=rhs.get()) |
|
template<class T , class U > |
auto | gmx::compat::operator< (const not_null< T > &lhs, const not_null< U > &rhs) -> decltype(lhs.get()< rhs.get()) |
|
template<class T , class U > |
auto | gmx::compat::operator<= (const not_null< T > &lhs, const not_null< U > &rhs) -> decltype(lhs.get()<=rhs.get()) |
|
template<class T , class U > |
auto | gmx::compat::operator> (const not_null< T > &lhs, const not_null< U > &rhs) -> decltype(lhs.get() > rhs.get()) |
|
template<class T , class U > |
auto | gmx::compat::operator>= (const not_null< T > &lhs, const not_null< U > &rhs) -> decltype(lhs.get() >=rhs.get()) |
|
|
template<class T , class U > |
std::ptrdiff_t | gmx::compat::operator- (const not_null< T > &, const not_null< U > &)=delete |
| Deleted unwanted arithmetic operators.
|
|
template<class T > |
not_null< T > | gmx::compat::operator- (const not_null< T > &, std::ptrdiff_t)=delete |
|
template<class T > |
not_null< T > | gmx::compat::operator+ (const not_null< T > &, std::ptrdiff_t)=delete |
|
template<class T > |
not_null< T > | gmx::compat::operator+ (std::ptrdiff_t, const not_null< T > &)=delete |
|