Bifrost SDK
Bifrost SDK documentation
Amino::SpanParam< T > Class Template Reference

Same as Span but the constructor from a range is implicit, making it more convenient and safe to use as a function input parameter. More...

#include <Span.h>

Inheritance diagram for Amino::SpanParam< T >:
Amino::Span< T >

Public Member Functions

template<typename R , typename = std::enable_if_t<!is_span_param<R>>>
constexpr SpanParam (R &&r)
 
constexpr SpanParam (Span< T > const &other)
 
- Public Member Functions inherited from Amino::Span< T >
constexpr Span () noexcept=default
 Default constructor (empty Span). More...
 
constexpr Span (T *data, size_type size)
 Construct a Span from a pointer and a size. More...
 
constexpr Span (T *begin, T *end)
 Construct a Span from a pointer to the beginning and a pointer to the end. More...
 
template<typename R , typename = std::enable_if_t<!is_span<R>>>
constexpr Span (R &&r)
 
constexpr bool empty () const
 Check if the Span is empty. More...
 
constexpr T * data () const
 Direct access to the underlying contiguous storage of the Span. More...
 
constexpr size_type size () const
 Returns the number of elements in the Span. More...
 
constexpr Span (std::nullptr_t, size_type)=delete
 Span is not constructible from a nullptr. More...
 
constexpr Span (T *, std::nullptr_t)=delete
 Span is not constructible from a nullptr. More...
 
constexpr Span (std::nullptr_t, T *)=delete
 Span is not constructible from a nullptr. More...
 
constexpr T const & operator[] (size_type i) const
 Access the ith element. More...
 
constexpr T & operator[] (size_type i)
 Access the ith element. More...
 
constexpr T const & front () const
 Access the first element. More...
 
constexpr T & front ()
 Access the first element. More...
 
constexpr T const & back () const
 Access the last element. More...
 
constexpr T & back ()
 Access the last element. More...
 
constexpr const_iterator cbegin () const
 Returns an iterator to the beginning of the Span. More...
 
constexpr const_iterator begin () const
 Returns an iterator to the beginning of the Span. More...
 
constexpr iterator begin ()
 Returns an iterator to the beginning of the Span. More...
 
constexpr const_iterator cend () const
 Returns an iterator to the end of the Span. More...
 
constexpr const_iterator end () const
 Returns an iterator to the end of the Span. More...
 
constexpr iterator end ()
 Returns an iterator to the end of the Span. More...
 

Additional Inherited Members

- Public Types inherited from Amino::Span< T >
using element_type = T
 
using value_type = std::remove_cv_t< T >
 
using iterator = T *
 
using const_iterator = T const *
 
using size_type = size_t
 
using difference_type = ptrdiff_t
 

Detailed Description

template<typename T>
class Amino::SpanParam< T >

Same as Span but the constructor from a range is implicit, making it more convenient and safe to use as a function input parameter.

Definition at line 178 of file Span.h.

Constructor & Destructor Documentation

◆ SpanParam() [1/2]

template<typename T >
template<typename R , typename = std::enable_if_t<!is_span_param<R>>>
constexpr Amino::SpanParam< T >::SpanParam ( R &&  r)
inlineconstexpr

Definition at line 189 of file Span.h.

◆ SpanParam() [2/2]

template<typename T >
constexpr Amino::SpanParam< T >::SpanParam ( Span< T > const &  other)
inlineconstexpr

Definition at line 192 of file Span.h.