Diag-Client-Lib
Classes | Namespaces | Typedefs | Functions | Variables
span.h File Reference
#include <array>
#include <iostream>
#include <limits>
#include <type_traits>
#include <utility>
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

struct  core_type::details::is_span< typename >
 Primary template handles Span types that have no nested ::type member. More...
 
struct  core_type::details::is_span< Span< T, Extent > >
 Type trait to check if passed element is Span or not. More...
 
struct  core_type::details::is_std_array< typename >
 Primary template handles std::array types that have no nested ::type member. More...
 
struct  core_type::details::is_std_array< std::array< T, N > >
 Type trait to check if passed element is std::array or not. More...
 
struct  core_type::details::is_data_size_valid< T, typename >
 Primary template handles std::size, std::data that have no nested ::type member. More...
 
struct  core_type::details::is_data_size_valid< T, std::void_t< decltype(std::data(std::declval< T >())), decltype(std::size(std::declval< T >()))> >
 Type trait to check if std::data(cont) and std::size(cont) are both well-formed. More...
 
struct  core_type::details::is_container_type< T, ElementType >
 Check if the element type is not a specialization of Span, Container is not a specialization of Array, Container is not a specialization of std::array, std::is_array<Container>::value is false, std::data(cont) and std::size(cont) are both well-formed. More...
 
struct  core_type::details::is_container_element_type_convertible< typename, typename, typename >
 Checks if std::remove_pointer_t<decltype(std::data(arr))>(*)[] is convertible to T(*)[]. More...
 
struct  core_type::details::is_container_element_type_convertible< F, T, typename std::enable_if< std::is_convertible< std::remove_pointer_t< decltype(std::data(std::declval< F >()))>(*)[], T(*)[]>::value >::type >
 Checks if std::remove_pointer_t<decltype(std::data(arr))>(*)[] is convertible to T(*)[]. More...
 
struct  core_type::details::span_storage< T, Extent >
 Storage class needed for span. More...
 
struct  core_type::details::span_storage< T, dynamic_extent >
 Storage class needed for span. More...
 
class  core_type::Span< T, Extent >
 A view over a contiguous sequence of objects. More...
 

Namespaces

 core_type
 
 core_type::details
 

Typedefs

template<typename T >
using core_type::details::remove_cv_ref_t = typename std::remove_cv< typename std::remove_reference< T >::type >::type
 Helper template alias to remove reference and cv and return the actual type. More...
 

Functions

void core_type::details::CheckIfExpectedOrAbort (bool cond, const char *message, const std::string_view file_name, int line_no)
 Check if the condition is as expected otherwise abort with provided message. More...
 
template<class T , size_t N>
 core_type::Span (T(&)[N]) -> Span< T, N >
 
template<class T , size_t N>
 core_type::Span (std::array< T, N > &) -> Span< T, N >
 
template<class T , size_t N>
 core_type::Span (const std::array< T, N > &) -> Span< const T, N >
 
template<class Container >
 core_type::Span (Container &) -> Span< typename std::remove_reference< decltype(*std::data(std::declval< Container & >()))>::type >
 
template<class Container >
 core_type::Span (const Container &) -> Span< const typename Container::value_type >
 

Variables

constexpr std::size_t core_type::dynamic_extent = std::numeric_limits<std::size_t>::max()
 A constant for creating Spans with dynamic sizes. More...