Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
Loading...
Searching...
No Matches
enable_permuted_arguments.hpp File Reference

Contains helper templates, based on and refined from SO post https://stackoverflow.com/questions/19329297/constructor-permutations-for-passing-parameters-in-arbitrary-order by user Daniel Frey. More...

#include <type_traits>
#include <tuple>
Include dependency graph for enable_permuted_arguments.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  bertini::detail::IndexByType< T, Remaining >
struct  bertini::detail::IndexByType< T, T, RemainingT... >
struct  bertini::detail::IndexByType< T1, T2, RemainingT... >
struct  bertini::detail::AreValidArguments< true >
struct  bertini::detail::DefaultConstruct< T >
 Holds a default-constructed value of T, used to fill arguments not present when unpermuting. More...

Namespaces

namespace  bertini
namespace  bertini::detail

Functions

template<std::size_t I, std::size_t J, typename T, typename... PresentT, typename... GivenT>
auto bertini::detail::GetByIndex (const std::tuple< PresentT... > &, const std::tuple< GivenT... > &absent_args) -> typename std::enable_if< I==sizeof...(PresentT), const T & >::type
 Get the value of type T, pulling from the given (absent) args when T is not among the present types.
template<std::size_t I, std::size_t J, typename T, typename... PresentT, typename... GivenT>
auto bertini::detail::GetByIndex (const std::tuple< PresentT... > &present_args, const std::tuple< GivenT... > &) -> typename std::enable_if< I !=sizeof...(PresentT), const T & >::type
 Get the value of type T from the present args when T is among the present types (the I != sizeof... overload).
template<std::size_t...>
void bertini::detail::ValidateTypes ()
 Proxy function ensuring the types are distinct and indexable by type (compile-time check).
template<typename... UnpermutedT, typename... PermutedPresentT>
std::tuple< const UnpermutedT &... > bertini::Unpermute (const PermutedPresentT &... present_permuted_args)
 Reorder a set of present arguments into the declared UnpermutedT order, default-constructing any absent.

Detailed Description

Contains helper templates, based on and refined from SO post https://stackoverflow.com/questions/19329297/constructor-permutations-for-passing-parameters-in-arbitrary-order by user Daniel Frey.