Hybrid::forLoop does not work with class derived from std::tuple
The Hybrid::forLoop
does not work with classes derived from std::tuple
. So for example
#include <iostream>
#include <tuple>
#include <utility>
template<typename... Args>
struct Foo:public std::tuple<Args...>
{
Foo(Args&&... args):
std::tuple<Args...>(std::forward<Args>(args)...)
{}
};
int main()
{
typedef Foo<int,int> Tuple; // DOES NOT WORK
//typedef std::tuple<int,int> Tuple; // WORKS
Tuple foo(1,2);
Dune::Hybrid::forEach(foo,[&](auto&& ti){std::cout<<ti<<std::endl;});
return 0;
}
does not work because the ADL choose the wrong size
specialization (the one with priority 0).