SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::equations::ContributionTuple< std::tuple< Ts... >, std::void_t< decltype(std::tuple_cat(std::declval< typename Contributions< std::remove_cvref_t< Ts > >::type >()...))> > Struct Template Reference

Specialization of ContributionTuple for tuples of contributions. This allows us to extract the contributions from a tuple of contributions. More...

#include <contributions.hpp>

Public Types

using type = decltype(std::tuple_cat(std::declval<typename Contributions<std::remove_cvref_t<Ts>>::type>()...))
 The tuple representing all contributions, Using the pack of contributions Ts... we can extract the contributions of each and then concatenate them into a single tuple. using C++17 folding.
 
using type
 The default type is void, indicating that the contributions are not valid.
 

Detailed Description

template<typename... Ts>
struct serif::equations::ContributionTuple< std::tuple< Ts... >, std::void_t< decltype(std::tuple_cat(std::declval< typename Contributions< std::remove_cvref_t< Ts > >::type >()...))> >

Specialization of ContributionTuple for tuples of contributions. This allows us to extract the contributions from a tuple of contributions.

Template Parameters
TsThe types of the contributions in the tuple.
Note
The syntax of this specialization is not easy to parse. What we say here is
  • We accept some pack of types Ts...
  • We unpack all of those into the first template argument of the default specialization of ContributionTuple, which is a tuple of Ts...
  • We use SFINAE to check if the tuple of contributions is valid by
    • Checking if a tuple of the test operands of the contributions is valid (i.e. all contributions have the same test operand)
Todo
Replace SFINAE with requires or concepts if possible. This would make the code more readable and easier to understand.

Member Typedef Documentation

◆ type [1/2]

using serif::equations::ContributionTuple< std::tuple< Ts... >, typename >::type

The default type is void, indicating that the contributions are not valid.

◆ type [2/2]

template<typename... Ts>
using serif::equations::ContributionTuple< std::tuple< Ts... >, std::void_t< decltype(std::tuple_cat(std::declval< typename Contributions< std::remove_cvref_t< Ts > >::type >()...))> >::type = decltype(std::tuple_cat(std::declval<typename Contributions<std::remove_cvref_t<Ts>>::type>()...))

The tuple representing all contributions, Using the pack of contributions Ts... we can extract the contributions of each and then concatenate them into a single tuple. using C++17 folding.


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