ATLAS Offline Software
Loading...
Searching...
No Matches
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 <ranges>
#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

namespace  CxxUtils

Functions

template<class T>
 CxxUtils::span (T *ptr, std::size_t sz) -> span< T >
 A couple needed deduction guides.
template<class T>
 CxxUtils::span (T *beg, T *end) -> span< T >
template<detail::IsContiguousContainer CONTAINER>
auto CxxUtils::make_span (CONTAINER &c)
 Helper to make a span from a container.
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().
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>?

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.