CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
Span.hpp File Reference
#include <array>
#include <cstddef>
#include <cstdint>
#include <type_traits>

Go to the source code of this file.

Namespaces

namespace  tcb
 
namespace  std
 
namespace  CeresEngine
 

Macros

#define TCB_SPAN_HPP_INCLUDED
 
#define TCB_SPAN_NO_EXCEPTIONS
 
#define TCB_SPAN_NAMESPACE_NAME   tcb
 
#define TCB_SPAN_NO_CONTRACT_CHECKING
 
#define TCB_SPAN_EXPECT(cond)
 
#define TCB_SPAN_INLINE_VAR
 
#define TCB_SPAN_CONSTEXPR14
 
#define TCB_SPAN_CONSTEXPR_ASSIGN
 
#define TCB_SPAN_CONSTEXPR11   constexpr
 
#define TCB_SPAN_ARRAY_CONSTEXPR
 
#define TCB_SPAN_NODISCARD
 
#define CE_SPAN_NS   tcb
 

Typedefs

using tcb::byte = unsigned char
 
template<typename T , std::size_t Extent = tcb ::dynamic_extent>
using CeresEngine::Span = tcb ::span< T, Extent >
 Span describes an object that can refer to a contiguous sequence of objects with the first element of the sequence at position zero.
 

Functions

template<typename ElementType , std::size_t Extent>
constexpr span< ElementType, Extent > tcb::make_span (span< ElementType, Extent > s) noexcept
 
template<typename T , std::size_t N>
constexpr span< T, N > tcb::make_span (T(&arr)[N]) noexcept
 
template<typename T , std::size_t N>
span< T, N > tcb::make_span (std::array< T, N > &arr) noexcept
 
template<typename T , std::size_t N>
span< const T, N > tcb::make_span (const std::array< T, N > &arr) noexcept
 
template<typename Container >
constexpr span< typename Container::value_type > tcb::make_span (Container &cont)
 
template<typename Container >
constexpr span< const typename Container::value_type > tcb::make_span (const Container &cont)
 
template<typename T , std::size_t X, typename U , std::size_t Y>
bool tcb::operator== (span< T, X > lhs, span< U, Y > rhs)
 
template<typename T , std::size_t X, typename U , std::size_t Y>
bool tcb::operator!= (span< T, X > lhs, span< U, Y > rhs)
 
template<typename T , std::size_t X, typename U , std::size_t Y>
bool tcb::operator< (span< T, X > lhs, span< U, Y > rhs)
 
template<typename T , std::size_t X, typename U , std::size_t Y>
bool tcb::operator<= (span< T, X > lhs, span< U, Y > rhs)
 
template<typename T , std::size_t X, typename U , std::size_t Y>
bool tcb::operator> (span< T, X > lhs, span< U, Y > rhs)
 
template<typename T , std::size_t X, typename U , std::size_t Y>
bool tcb::operator>= (span< T, X > lhs, span< U, Y > rhs)
 
template<typename ElementType , std::size_t Extent>
span< const byte,((Extent==dynamic_extent) ? dynamic_extent :sizeof(ElementType) *Extent)> tcb::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)> tcb::as_writable_bytes (span< ElementType, Extent > s) noexcept
 
template<std::size_t N, typename E , std::size_t S>
constexpr auto tcb::get (span< E, S > s) -> decltype(s[N])
 

Variables

constexpr std::size_t tcb::dynamic_extent = SIZE_MAX
 

Macro Definition Documentation

◆ CE_SPAN_NS

#define CE_SPAN_NS   tcb

◆ TCB_SPAN_ARRAY_CONSTEXPR

#define TCB_SPAN_ARRAY_CONSTEXPR

◆ TCB_SPAN_CONSTEXPR11

#define TCB_SPAN_CONSTEXPR11   constexpr

◆ TCB_SPAN_CONSTEXPR14

#define TCB_SPAN_CONSTEXPR14

◆ TCB_SPAN_CONSTEXPR_ASSIGN

#define TCB_SPAN_CONSTEXPR_ASSIGN

◆ TCB_SPAN_EXPECT

#define TCB_SPAN_EXPECT (   cond)

◆ TCB_SPAN_HPP_INCLUDED

#define TCB_SPAN_HPP_INCLUDED

◆ TCB_SPAN_INLINE_VAR

#define TCB_SPAN_INLINE_VAR

◆ TCB_SPAN_NAMESPACE_NAME

#define TCB_SPAN_NAMESPACE_NAME   tcb

◆ TCB_SPAN_NO_CONTRACT_CHECKING

#define TCB_SPAN_NO_CONTRACT_CHECKING

◆ TCB_SPAN_NO_EXCEPTIONS

#define TCB_SPAN_NO_EXCEPTIONS

◆ TCB_SPAN_NODISCARD

#define TCB_SPAN_NODISCARD