ATLAS Offline Software
Classes | Namespaces | Functions | Variables
span.h File Reference

Simplified version of the C++20 std::span. More...

#include "CxxUtils/concepts.h"
#include <cstdlib>
#include <type_traits>
#include <iterator>
#include <cassert>
#include "CxxUtils/features.h"
#include "CxxUtils/span.icc"
Include dependency graph for span.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CxxUtils::span< T >
 Simplified version of the C++20 std::span. More...
 

Namespaces

 CxxUtils
 

Functions

template<class T >
 CxxUtils::span (T *ptr, std::size_t sz) -> span< T >
 A couple needed deduction guides. More...
 
template<class T >
 CxxUtils::span (T *beg, T *end) -> span< T >
 
template<class CONTAINER >
auto CxxUtils::make_span (CONTAINER &c)
 Helper to make a span from a container. More...
 
template<class T >
auto CxxUtils::begin (span< T > &s)
 
template<class T >
auto CxxUtils::begin (const span< T > &s)
 
template<class T >
auto CxxUtils::end (span< T > &s)
 
template<class T >
auto CxxUtils::end (const span< T > &s)
 

Variables

constexpr size_t CxxUtils::dynamic_extent = static_cast<size_t>(-1)
 Used to specify a subrange of indefinite size in subspan(). More...
 
template<class T , class U >
constexpr bool CxxUtils::valid_span_type_v = std::is_convertible_v<U(*)[], T(*)[]>
 Is U* a valid type to use to initialize a span<T>? No more than const-conversion. More...
 

Detailed Description

Simplified version of the C++20 std::span.

Author
scott snyder snyde.nosp@m.r@bn.nosp@m.l.gov
Date
Jan, 2022

Definition in file span.h.