Finite Volume Solver
prototype
A framework to build finite volume solvers for the AG Klein at the Freie Universität Berlin.
|
A span is a view over a contiguous sequence of objects, the storage of which is owned by some other object. More...
#include <span.hpp>
Public Types | |
using | element_type = T |
using | pointer = T * |
using | reference = T & |
using | value_type = std::remove_cv_t< T > |
using | index_type = std::ptrdiff_t |
using | difference_type = std::ptrdiff_t |
using | iterator = pointer |
using | const_iterator = std::add_const_t< T > * |
using | reverse_iterator = std::reverse_iterator< iterator > |
using | const_reverse_iterator = std::reverse_iterator< const_iterator > |
Public Member Functions | |
Constructors, copy, and assignment [span.cons] | |
constexpr | span () noexcept=default |
Constructs an empty span. More... | |
constexpr | span (pointer p, [[maybe_unused]] index_type size) |
Constructs a span from a pointer + size pair. More... | |
constexpr | span (pointer first, pointer last) |
Constructs a span from two pointer s. More... | |
template<typename Container > | |
constexpr | span (Container &container) |
Implicit conversion operator from a mutable container. More... | |
template<typename Container > | |
constexpr | span (const Container &container) |
Implicit conversion operator from a constant container. More... | |
template<typename S > | |
constexpr | span (const span< S, 0 > &s) noexcept |
Implicit conversion from other span types. More... | |
constexpr | span (const span &s) noexcept=default |
Defaulted copy constructor to trivially copy the class member variables. More... | |
Observers [span.obs] | |
constexpr index_type | size () const noexcept |
Returns the number of elements in the span. More... | |
constexpr std::ptrdiff_t | size_bytes () const noexcept |
Returns the number of bytes which are spanned by this span. More... | |
constexpr bool | empty () const noexcept |
Returns true if size() == 0 . More... | |
Element access [span.elem] | |
constexpr pointer | data () const noexcept |
Returns the underlying pointer. More... | |
Static Public Attributes | |
static constexpr index_type | extent |
Iterator support [span.iterators] | |
pointer | pointer_ |
Returns an iterator pointing to the first element of the span. More... | |
constexpr iterator | begin () const noexcept |
Returns an iterator pointing to the first element of the span. More... | |
constexpr const_iterator | cbegin () const noexcept |
Returns a const iterator pointing to the first element of the span. More... | |
constexpr iterator | end () const noexcept |
Returns an iterator pointing one after the last element of the span. More... | |
constexpr const_iterator | cend () const noexcept |
Returns a const iterator pointing one after the last element of the span. More... | |
constexpr reverse_iterator | rbegin () const noexcept |
Returns a reverse iterator pointing to the last element of the span. More... | |
constexpr const_reverse_iterator | crbegin () const noexcept |
Returns a const reverse iterator pointing to the last element of the span. More... | |
constexpr reverse_iterator | rend () const noexcept |
Returns a reverse iterator pointing to the first element of the span. More... | |
constexpr const_reverse_iterator | crend () const noexcept |
Returns a const reverse iterator pointing to the first element of the span. More... | |
A span is a view over a contiguous sequence of objects, the storage of which is owned by some other object.
All member functions of span have constant time complexity.
T
is required to be a complete object type that is not an abstract class type.
If N
is negative and not equal to dynamic_extent, the program is ill-formed.
using fub::span< T, 0 >::const_iterator = std::add_const_t<T>* |
using fub::span< T, 0 >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
using fub::span< T, 0 >::difference_type = std::ptrdiff_t |
using fub::span< T, 0 >::element_type = T |
using fub::span< T, 0 >::index_type = std::ptrdiff_t |
using fub::span< T, 0 >::reverse_iterator = std::reverse_iterator<iterator> |
using fub::span< T, 0 >::value_type = std::remove_cv_t<T> |
|
inlineconstexpr |
|
inlineconstexpr |
Constructs a span from two pointer
s.
This performs an assertion check in debug builds which will terminate the application if the specified size does not match the extent.
first
and last
are valid pointers. first == last
Nothing. |
|
inlineconstexprnoexcept |
Implicit conversion from other span types.
Nothing. |
|
constexprdefaultnoexcept |
Defaulted copy constructor to trivially copy the class member variables.
Nothing. |
Returns an iterator pointing to the first element of the span.
Nothing. |
|
inlineconstexprnoexcept |
Returns a const iterator pointing to the first element of the span.
Nothing. |
|
inlineconstexprnoexcept |
Returns a const iterator pointing one after the last element of the span.
Nothing. |
|
inlineconstexprnoexcept |
Returns a const reverse iterator pointing to the last element of the span.
Nothing. |
|
inlineconstexprnoexcept |
Returns a const reverse iterator pointing to the first element of the span.
Nothing. |
Returns the underlying pointer.
Nothing. |
|
inlineconstexprnoexcept |
Returns true if size() == 0
.
Nothing. |
Returns an iterator pointing one after the last element of the span.
Nothing. |
|
inlineconstexprnoexcept |
Returns a reverse iterator pointing to the last element of the span.
Nothing. |
|
inlineconstexprnoexcept |
Returns a reverse iterator pointing to the first element of the span.
Nothing. |
|
inlineconstexprnoexcept |
Returns the number of elements in the span.
Nothing. |
|
inlineconstexprnoexcept |
Returns the number of bytes which are spanned by this span.
Nothing. |
|
staticconstexpr |
Returns an iterator pointing to the first element of the span.
Nothing. |