Skip to content
Snippets Groups Projects
Commit 4bc4276c authored by Carsten Gräser's avatar Carsten Gräser
Browse files

Specialize std::tuple_size for MultiTypeBlock*

... because we also specialize `std::tuple_element` and
it derives from `std::tuple` after all.
parent 674ef3d7
No related branches found
No related tags found
1 merge request!512Specialize std::tuple_size for MultiTypeBlock*
Pipeline #55992 passed
......@@ -613,5 +613,14 @@ namespace std
{
using type = typename std::tuple_element<i, std::tuple<Args...> >::type;
};
/** \brief Make std::tuple_size work for MultiTypeBlockMatrix
*
* It derives from std::tuple after all.
*/
template <typename... Args>
struct tuple_size<Dune::MultiTypeBlockMatrix<Args...> >
: std::integral_constant<std::size_t, sizeof...(Args)>
{};
}
#endif
......@@ -345,6 +345,15 @@ namespace std
{
using type = typename std::tuple_element<i, std::tuple<Args...> >::type;
};
/** \brief Make std::tuple_size work for MultiTypeBlockVector
*
* It derives from std::tuple after all.
*/
template <typename... Args>
struct tuple_size<Dune::MultiTypeBlockVector<Args...> >
: std::integral_constant<std::size_t, sizeof...(Args)>
{};
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment