Templa 0.0.1-alpha
C++ Metaprogramming Utilities
Loading...
Searching...
No Matches
templa::internal::uniform_element_identity< elems > Struct Template Reference

Uniform element identity helper for a list of values. More...

#include <pack.hpp>

Public Types

using uniform_type = typename std::array<decltype(lambda(std::make_index_sequence<size>{})), size>
 Type alias for the uniform std::array of elements.
using value_type = typename uniform_type::value_type
 Value type of the uniform_type.

Static Public Attributes

static constexpr std::size_t size = sizeof...(elems)
 Number of elements.
static constexpr bool valid
 Check if all elements have the same decayed type and are comparable.
static constexpr uniform_type identity_value {elems...}
 Static array holding the elements.

Detailed Description

template<auto... elems>
struct templa::internal::uniform_element_identity< elems >

Uniform element identity helper for a list of values.

Enforces all elements have the same type and are comparable.

Template Parameters
elemsNon-type template parameter pack of elements.

Member Data Documentation

◆ valid

template<auto... elems>
bool templa::internal::uniform_element_identity< elems >::valid
staticconstexpr
Initial value:
= (std::is_same_v<std::decay_t<decltype(elems)>, std::decay_t<decltype(std::get<0>(std::tuple{elems...}))>> && ...) &&
(concepts::Comparable<decltype(elems)> && ...)
Concept to check if a type supports common comparison operators.
Definition concepts.hpp:57

Check if all elements have the same decayed type and are comparable.


The documentation for this struct was generated from the following file:
  • Templa/include/templa-include/pack.hpp