alpaqa 1.0.0a13
Nonconvex constrained optimization
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
alpaqa::params::detail Namespace Reference

Classes

struct  _dummy
 Unused unique type tag for template specializations that were rejected because some types were not distinct.
 

Typedefs

template<class NewAlias , class... PossibleAliases>
using possible_alias_t = std::conditional_t< any_is_same< NewAlias, PossibleAliases... >(), _dummy< NewAlias, PossibleAliases... >, NewAlias >
 If NewAlias is not the same type as any of PossibleAliases, the result is NewAlias.
 

Functions

template<class A , class... Bs>
constexpr bool any_is_same ()
 Check if A is equal to any of Bs.
 

Typedef Documentation

◆ possible_alias_t

template<class NewAlias , class... PossibleAliases>
using possible_alias_t = std::conditional_t<any_is_same<NewAlias, PossibleAliases...>(), _dummy<NewAlias, PossibleAliases...>, NewAlias>

If NewAlias is not the same type as any of PossibleAliases, the result is NewAlias.

If NewAlias is not distinct from PossibleAliases, the result is a dummy type, uniquely determined by NewAlias and PossibleAliases.

Definition at line 393 of file params.cpp.

Function Documentation

◆ any_is_same()

template<class A , class... Bs>
constexpr bool any_is_same ( )
constexpr

Check if A is equal to any of Bs.

Definition at line 379 of file params.cpp.