dune-common 2.10
Loading...
Searching...
No Matches
Classes | Namespaces | Functions | Variables
span.hh File Reference
#include <cassert>
#include <cstddef>
#include <exception>
#include <iterator>
#include <limits>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <dune/common/exceptions.hh>
#include <dune/common/std/memory.hh>

Go to the source code of this file.

Classes

class  Dune::Std::span< Element, Extent >
 A contiguous sequence of elements with static or dynamic extent. More...
 

Namespaces

namespace  Dune
 Dune namespace.
 
namespace  Dune::Std
 Namespace for features backported from new C++ standards.
 

Functions

template<class T , std::size_t N>
 Dune::Std::span (T(&)[N]) -> span< T, N >
 
template<class ElementType , class I , std::size_t Extent, std::enable_if_t< std::is_convertible_v< I, std::size_t >, int > = 0>
 Dune::Std::span (ElementType *, std::integral_constant< I, Extent >) -> span< ElementType, Extent >
 
template<class ElementType , class I , std::enable_if_t< std::is_integral_v< I >, int > = 0, std::enable_if_t< std::is_convertible_v< I, std::size_t >, int > = 0>
 Dune::Std::span (ElementType *, I) -> span< ElementType, Std::dynamic_extent >
 
template<class Iter , class Element = std::remove_reference_t<decltype(*std::declval<Iter>())>>
 Dune::Std::span (Iter, Iter) -> span< Element, Std::dynamic_extent >
 
template<class Range , class First = decltype(std::begin(std::declval<Range>())), class Last = decltype(std::end(std::declval<Range>())), class Element = std::remove_reference_t<decltype(*std::declval<First>())>>
 Dune::Std::span (Range &) -> span< Element, Std::dynamic_extent >
 
template<class T , size_t N>
 Dune::Std::span (std::array< T, N > &) -> span< T, N >
 
template<class T , size_t N>
 Dune::Std::span (const std::array< T, N > &) -> span< const T, N >
 

Variables

constexpr std::size_t Dune::Std::dynamic_extent = std::numeric_limits<std::size_t>::max()
 A constant of type std::size_t that is used to differentiate std::span of static and dynamic extent.