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

Extract elements from a container-like template parameter as a new container. More...

#include <pack.hpp>

Public Types

using type = decltype(a)::value_type
 Value type of the container.

Static Public Attributes

static constexpr auto value
 Compile-time generated container with the elements of a. Uses index_sequence to access each element.
static constexpr std::size_t size = value.size()
 Number of elements in the generated container.

Detailed Description

template<auto a>
requires (concepts::Container<std::remove_cv_t<decltype(a)>>)
struct templa::internal::forward_elements_from< a >

Extract elements from a container-like template parameter as a new container.

Template Parameters
aA container-like non-type template parameter.

Member Data Documentation

◆ value

template<auto a>
auto templa::internal::forward_elements_from< a >::value
staticconstexpr
Initial value:
= []<std::size_t... I>(std::index_sequence<I...>) consteval
{
return decltype(a){a[I]...};
}(std::make_index_sequence<a.size()>{})

Compile-time generated container with the elements of a. Uses index_sequence to access each element.


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