WebCFace 2.5.2
Web-based Communication Framework & Dashboard-like UI
Loading...
Searching...
No Matches
array_like.h File Reference
#include <stdexcept>
#include <vector>
#include <array>
#include <type_traits>
#include <string>
#include "trait.h"
#include "webcface-config.h"
Include dependency graph for array_like.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ArrayLikeTraitCheck< bool >
 
struct  ArrayLikeTraitCheck< true >
 
struct  ArraySizeTraitCheck< bool >
 
struct  ArraySizeTraitCheck< true >
 
struct  ArrayLikeTrait< T >
 
struct  ArrayLikeTrait< T[N]>
 
struct  ArrayLikeTrait< T(&)[N]>
 
struct  ArraySizeTrait< T, Num >
 
struct  ArraySizeTrait< T[N], Num >
 
struct  ArraySizeTrait< T(&)[N], Num >
 

Namespaces

namespace  webcface
 
namespace  webcface::traits
 

Typedefs

template<typename T >
using IsArrayLike = decltype(isArrayLike(std::declval< T >()))
 
template<typename T , std::size_t Num>
using ArraySizeMatch = decltype(arraySizeMatch(std::declval< T >(), std::integral_constant< std::size_t, Num >()))
 

Functions

constexpr std::false_type isArrayLike (...)
 
template<typename T >
constexpr auto isArrayLike (T) -> std::bool_constant< std::is_convertible_v< decltype(*std::begin(std::declval< T >())), double > &&std::is_convertible_v< decltype(*std::end(std::declval< T >())), double > >
 
constexpr std::true_type arraySizeMatch (...)
 
template<typename T , std::size_t Num>
constexpr auto arraySizeMatch (T, std::integral_constant< std::size_t, Num >) -> std::bool_constant< std::tuple_size< T >::value==Num >
 
template<typename T >
std::vector< double > arrayLikeToVector (const T &array)
 
template<std::size_t Num, typename T >
std::array< double, Num > arrayLikeToArray (const T &array)