Skip to content
Snippets Groups Projects
Commit 71581e5f authored by Simon Praetorius's avatar Simon Praetorius
Browse files

make TupleVector element access more SFINAE friendly

parent 4e044573
Branches
Tags
1 merge request!760make TupleVector element access more SFINAE friendly
......@@ -61,7 +61,8 @@ public:
/** \brief Const access to the tuple elements
*/
template<std::size_t i>
template<std::size_t i,
std::enable_if_t<(i < sizeof...(T)), int> = 0>
constexpr decltype(auto) operator[](const Dune::index_constant<i>&) const
{
return std::get<i>(*this);
......@@ -69,7 +70,8 @@ public:
/** \brief Non-const access to the tuple elements
*/
template<std::size_t i>
template<std::size_t i,
std::enable_if_t<(i < sizeof...(T)), int> = 0>
decltype(auto) operator[](const Dune::index_constant<i>&)
{
return std::get<i>(*this);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment