Phosphor
gsl_p Namespace Reference

Classes

struct  dyn_array
 
class  multidimensional_iterator
 
class  span
 

Typedefs

using string_span = span< char >
 
using cstring_span = span< const char >
 

Functions

template<class CharT >
bool operator== (span< CharT > lhs, span< CharT > rhs)
 
template<typename T , size_t N>
constexpr span< T > make_span (T(&s)[N])
 
template<size_t N>
constexpr span< const char > make_span (const char(&s)[N])
 
std::ostream & operator<< (std::ostream &os, const gsl_p::cstring_span &s)
 

Detailed Description

LICENSE.TXT: CREDITS.TXT

Function Documentation

template<typename T , size_t N>
constexpr span<T> gsl_p::make_span ( T(&)  s[N])

Creates a span from a reference to a C-Array

Template Parameters
TUnderlying type of array
Parameters
sReference to array
Returns
span of the array
template<size_t N>
constexpr span<const char> gsl_p::make_span ( const char(&)  s[N])

Specialisation of make_span for string literals (removes null byte)

Parameters
sReference to string literal
Returns
span of the string literal