preCICE v3.1.2
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Typedefs | Functions | Variables
span.hpp File Reference
#include <array>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <type_traits>
Include dependency graph for span.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  precice::detail::span_storage< E, S >
 
struct  precice::detail::span_storage< E, dynamic_extent >
 
struct  precice::detail::is_span< typename >
 
struct  precice::detail::is_span< span< T, S > >
 
struct  precice::detail::is_std_array< typename >
 
struct  precice::detail::is_std_array< std::array< T, N > >
 
struct  precice::detail::has_size_and_data< typename, typename >
 
struct  precice::detail::has_size_and_data< T, void_t< decltype(detail::size(std::declval< T >())), decltype(detail::data(std::declval< T >()))> >
 
struct  precice::detail::is_container< C, U >
 
struct  precice::detail::is_container_element_type_compatible< typename, typename, typename >
 
struct  precice::detail::is_container_element_type_compatible< T, E, typename std::enable_if< !std::is_same< typename std::remove_cv< decltype(detail::data(std::declval< T >()))>::type, void >::value &&std::is_convertible< remove_pointer_t< decltype(detail::data(std::declval< T >()))>(*)[], E(*)[]>::value >::type >
 
struct  precice::detail::is_complete< typename, typename >
 
struct  precice::detail::is_complete< T, decltype(sizeof(T))>
 
class  precice::span< ElementType, Extent >
 A C++ 11 implementation of the non-owning C++20 std::span type. More...
 
class  std::tuple_size< precice::span< ElementType, Extent > >
 
class  std::tuple_element< I, precice::span< ElementType, Extent > >
 

Namespaces

namespace  precice
 Main namespace of the precice library.
 
namespace  precice::detail
 
namespace  std
 STL namespace.
 

Macros

#define PRECICE_SPAN_NO_EXCEPTIONS
 
#define PRECICE_SPAN_NO_CONTRACT_CHECKING
 
#define PRECICE_SPAN_EXPECT(cond)
 
#define PRECICE_SPAN_INLINE_VAR
 
#define PRECICE_SPAN_CONSTEXPR14
 
#define PRECICE_SPAN_CONSTEXPR_ASSIGN
 
#define PRECICE_SPAN_CONSTEXPR11   constexpr
 
#define PRECICE_SPAN_ARRAY_CONSTEXPR
 
#define PRECICE_SPAN_NODISCARD
 

Typedefs

using precice::byte = unsigned char
 
template<typename... >
using precice::detail::void_t = void
 
template<typename T >
using precice::detail::uncvref_t
 
template<typename T >
using precice::detail::remove_pointer_t = typename std::remove_pointer<T>::type
 

Functions

template<class C >
constexpr auto precice::detail::size (const C &c) -> decltype(c.size())
 
template<class T , std::size_t N>
constexpr std::size_t precice::detail::size (const T(&)[N]) noexcept
 
template<class C >
constexpr auto precice::detail::data (C &c) -> decltype(c.data())
 
template<class C >
constexpr auto precice::detail::data (const C &c) -> decltype(c.data())
 
template<class T , std::size_t N>
constexpr T * precice::detail::data (T(&array)[N]) noexcept
 
template<class E >
constexpr const E * precice::detail::data (std::initializer_list< E > il) noexcept
 
template<typename ElementType , std::size_t Extent>
constexpr span< ElementType, Extent > precice::make_span (span< ElementType, Extent > s) noexcept
 
template<typename T , std::size_t N>
constexpr span< T, N > precice::make_span (T(&arr)[N]) noexcept
 
template<typename T , std::size_t N>
PRECICE_SPAN_ARRAY_CONSTEXPR span< T, N > precice::make_span (std::array< T, N > &arr) noexcept
 
template<typename T , std::size_t N>
PRECICE_SPAN_ARRAY_CONSTEXPR span< const T, N > precice::make_span (const std::array< T, N > &arr) noexcept
 
template<typename Container >
constexpr span< typenamestd::remove_reference< decltype(*detail::data(std::declval< Container & >()))>::type precice::make_span (Container &cont)
 
template<typename Container >
constexpr span< const typename Container::value_type > precice::make_span (const Container &cont)
 
template<typename ElementType , std::size_t Extent>
span< const byte,((Extent==dynamic_extent) ? dynamic_extent :sizeof(ElementType) *Extent)> precice::as_bytes (span< ElementType, Extent > s) noexcept
 
template<class ElementType , size_t Extent, typename std::enable_if<!std::is_const< ElementType >::value, int >::type = 0>
span< byte,((Extent==dynamic_extent) ? dynamic_extent :sizeof(ElementType) *Extent)> precice::as_writable_bytes (span< ElementType, Extent > s) noexcept
 
template<std::size_t N, typename E , std::size_t S>
constexpr auto precice::get (span< E, S > s) -> decltype(s[N])
 

Variables

PRECICE_SPAN_INLINE_VAR constexpr std::size_t precice::dynamic_extent = SIZE_MAX
 

Macro Definition Documentation

◆ PRECICE_SPAN_ARRAY_CONSTEXPR

#define PRECICE_SPAN_ARRAY_CONSTEXPR

Definition at line 129 of file span.hpp.

◆ PRECICE_SPAN_CONSTEXPR11

#define PRECICE_SPAN_CONSTEXPR11   constexpr

Definition at line 109 of file span.hpp.

◆ PRECICE_SPAN_CONSTEXPR14

#define PRECICE_SPAN_CONSTEXPR14

Definition at line 98 of file span.hpp.

◆ PRECICE_SPAN_CONSTEXPR_ASSIGN

#define PRECICE_SPAN_CONSTEXPR_ASSIGN

Definition at line 105 of file span.hpp.

◆ PRECICE_SPAN_EXPECT

#define PRECICE_SPAN_EXPECT ( cond)

Definition at line 81 of file span.hpp.

◆ PRECICE_SPAN_INLINE_VAR

#define PRECICE_SPAN_INLINE_VAR

Definition at line 87 of file span.hpp.

◆ PRECICE_SPAN_NO_CONTRACT_CHECKING

#define PRECICE_SPAN_NO_CONTRACT_CHECKING

Definition at line 52 of file span.hpp.

◆ PRECICE_SPAN_NO_EXCEPTIONS

#define PRECICE_SPAN_NO_EXCEPTIONS

Definition at line 26 of file span.hpp.

◆ PRECICE_SPAN_NODISCARD

#define PRECICE_SPAN_NODISCARD

Definition at line 141 of file span.hpp.