FleCSI User API Version: 2.3.0
 
Loading...
Searching...
No Matches
span< T > Struct Template Reference

A workalike for std::span from C++20 (only dynamic-extent, without ranges support). More...

Public Member Functions

template<class C , class = std::enable_if_t<std::is_convertible_v< std::remove_pointer_t<decltype(void(std::size(std::declval<C &&>())), std::data(std::declval<C &&>()))> (*)[], T(*)> > >
constexpr span (C &&c)
 

Detailed Description

template<class T>
struct flecsi::util::span< T >

A workalike for std::span from C++20 (only dynamic-extent, without ranges support).

This class is supported for GPU execution.

Constructor & Destructor Documentation

◆ span()

template<class T >
template<class C , class = std::enable_if_t<std::is_convertible_v< std::remove_pointer_t<decltype(void(std::size(std::declval<C &&>())), std::data(std::declval<C &&>()))> (*)[], T(*)> > >
constexpr span ( C &&  c)
constexpr
Warning
Destroying C leaves this object dangling if it owns its elements. This implementation does not check for "borrowing".