Public Types | Static Public Attributes | List of all members
exactly_one< Predicate, Default, Ts > Struct Template Reference

#include <common.h>

Public Types

using type = conditional_t< found, typename pack_element< index, Ts... >::type, Default >
 

Static Public Attributes

static constexpr auto found = constexpr_sum(Predicate<Ts>::value...)
 
static constexpr auto index = found ? constexpr_first<Predicate, Ts...>() : 0
 

Detailed Description

template<template< typename > class Predicate, typename Default, typename... Ts>
struct exactly_one< Predicate, Default, Ts >

Return the one and only type which matches the predicate, or Default if none match. If more than one type matches the predicate, fail at compile-time.

Definition at line 876 of file wrap/pybind11/include/pybind11/detail/common.h.

Member Typedef Documentation

◆ type

template<template< typename > class Predicate, typename Default , typename... Ts>
using exactly_one< Predicate, Default, Ts >::type = conditional_t<found, typename pack_element<index, Ts...>::type, Default>

Member Data Documentation

◆ found

template<template< typename > class Predicate, typename Default , typename... Ts>
constexpr auto exactly_one< Predicate, Default, Ts >::found = constexpr_sum(Predicate<Ts>::value...)
staticconstexpr

◆ index

template<template< typename > class Predicate, typename Default , typename... Ts>
constexpr auto exactly_one< Predicate, Default, Ts >::index = found ? constexpr_first<Predicate, Ts...>() : 0
staticconstexpr

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


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:10:01