Celeritas 0.7+6a0175f
Loading...
Searching...
No Matches
Classes | Functions
Array.hh File Reference
#include <cstddef>
#include <type_traits>
#include <utility>
#include "corecel/Macros.hh"
#include "corecel/Types.hh"
#include "corecel/io/StreamableContainer.hh"

Classes

class  celeritas::Array< T, N >
 Fixed-size simple array for storage. More...
 

Functions

template<class T , class... Us>
 celeritas::Array (T, Us...) -> Array< std::common_type_t< T, Us... >, 1+sizeof...(Us)>
 
template<class T , size_type N>
constexpr bool celeritas::operator== (Array< T, N > const &lhs, Array< T, N > const &rhs)
 Test equality of two arrays.
 
template<class T , size_type N>
constexpr bool celeritas::operator!= (Array< T, N > const &lhs, Array< T, N > const &rhs)
 Test inequality of two arrays.
 
template<class T , size_type N>
std::ostream & celeritas::operator<< (std::ostream &os, Array< T, N > const &a)
 Write the elements of array a to stream os.
 
template<class T , size_type N>
constexpr auto celeritas::to_array (T(&x)[N])
 Convert a C array from type T2 to an Array of T1.
 
template<class T1 , class T2 , size_type N>
constexpr Array< T1, N > celeritas::static_array_cast (Array< T2, N > const &x)
 Convert an array from type T2 to T1.
 

Function Documentation

◆ to_array()

template<class T , size_type N>
constexpr auto celeritas::to_array ( T(&)  x[N])
inlineconstexpr

Convert a C array from type T2 to an Array of T1.

The standard library version of this function is available since C++20.