Classes | Typedefs | Functions | Variables
gsl Namespace Reference

Implementations from the Guideline Support Library. More...

Classes

class  not_null
 Require a pointer to not be a nullptr More...
 
class  span
 Create a span/view on a range, which is cheap to copy (one pointer). More...
 

Typedefs

template<class T , Requires< std::is_pointer< T >::value > = nullptr>
using owner = typename detail::owner_impl< T >::type
 Mark a raw pointer as owning its data. More...
 

Functions

template<class T , class U >
constexpr T narrow_cast (U &&u) noexcept
 Cast u to a type T where the cast may result in narrowing.
 
template<class T , class U >
narrow (U u)
 A checked version of narrow_cast() that ERRORs if the cast changed the value.
 
template<class T >
std::ostreamoperator<< (std::ostream &os, const not_null< T > &val) noexcept
 
template<class T , class U >
auto operator== (const not_null< T > &lhs, const not_null< U > &rhs) -> decltype(lhs.get()==rhs.get())
 
template<class T , class U >
auto operator!= (const not_null< T > &lhs, const not_null< U > &rhs) -> decltype(lhs.get() !=rhs.get())
 
template<class T , class U >
auto operator< (const not_null< T > &lhs, const not_null< U > &rhs) -> decltype(lhs.get()< rhs.get())
 
template<class T , class U >
auto operator<= (const not_null< T > &lhs, const not_null< U > &rhs) -> decltype(lhs.get()<=rhs.get())
 
template<class T , class U >
auto operator> (const not_null< T > &lhs, const not_null< U > &rhs) -> decltype(lhs.get() > rhs.get())
 
template<class T , class U >
auto operator>= (const not_null< T > &lhs, const not_null< U > &rhs) -> decltype(lhs.get() >=rhs.get())
 
template<class T , class U >
std::ptrdiff_t operator- (const not_null< T > &, const not_null< U > &)=delete
 
template<class T >
not_null< T > operator- (const not_null< T > &, std::ptrdiff_t)=delete
 
template<class T >
not_null< T > operator+ (const not_null< T > &, std::ptrdiff_t)=delete
 
template<class T >
not_null< T > operator+ (std::ptrdiff_t, const not_null< T > &)=delete
 
template<class ElementType , std::ptrdiff_t FirstExtent, std::ptrdiff_t SecondExtent>
constexpr bool operator== (span< ElementType, FirstExtent > l, span< ElementType, SecondExtent > r)
 
template<class ElementType , std::ptrdiff_t Extent>
constexpr bool operator!= (span< ElementType, Extent > l, span< ElementType, Extent > r)
 
template<class ElementType , std::ptrdiff_t Extent>
constexpr bool operator< (span< ElementType, Extent > l, span< ElementType, Extent > r)
 
template<class ElementType , std::ptrdiff_t Extent>
constexpr bool operator<= (span< ElementType, Extent > l, span< ElementType, Extent > r)
 
template<class ElementType , std::ptrdiff_t Extent>
constexpr bool operator> (span< ElementType, Extent > l, span< ElementType, Extent > r)
 
template<class ElementType , std::ptrdiff_t Extent>
constexpr bool operator>= (span< ElementType, Extent > l, span< ElementType, Extent > r)
 
template<class ElementType , std::ptrdiff_t Extent>
constexpr ElementType & at (span< ElementType, Extent > s, typename span< ElementType, Extent >::index_type i)
 
template<class ElementType , std::ptrdiff_t Extent>
std::ostreamoperator<< (std::ostream &os, const span< ElementType, Extent > t) noexcept
 

Variables

constexpr const std::ptrdiff_t dynamic_extent = -1
 

Detailed Description

Implementations from the Guideline Support Library.