Templa 0.0.1-alpha
C++ Metaprogramming Utilities
Loading...
Searching...
No Matches
templa::algorithms::min< Es > Struct Template Reference

Computes the minimum value among a pack of compile-time constants. More...

#include <algorithms.hpp>

Inheritance diagram for templa::algorithms::min< Es >:
templa::internal::uniform_element_identity< Es... >

Public Types

using identity_type = typename templa::internal::uniform_element_identity<Es...>
 Alias for the identity type that represents the uniform compile-time values.
Public Types inherited from templa::internal::uniform_element_identity< Es... >
using uniform_type
 Type alias for the uniform std::array of elements.
using value_type
 Value type of the uniform_type.

Static Public Attributes

static constexpr value_type value
 The minimum value among the compile-time constants.
Static Public Attributes inherited from templa::internal::uniform_element_identity< Es... >
static constexpr std::size_t size
 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
 Static array holding the elements.

Detailed Description

template<auto... Es>
struct templa::algorithms::min< Es >

Computes the minimum value among a pack of compile-time constants.

This struct accepts a parameter pack of compile-time constants and computes the minimum value using std::min_element.

Template Parameters
EsThe pack of compile-time constant values.

Member Data Documentation

◆ value

template<auto... Es>
value_type templa::algorithms::min< Es >::value
staticconstexpr
Initial value:
=
*std::min_element(identity_type::identity_value.begin(), identity_type::identity_value.end())

The minimum value among the compile-time constants.


The documentation for this struct was generated from the following file: