In C++14, it is not possible to call a function template with multiple parameter packs:
#include <future>
template<class... Futures, class... Incrementables>
void foo(Futures&... futures, Incrementables... incrementables)
{
}
int main()
{
std::future<int> a, b;
int x, y;
// ERROR
foo(a, b, x, y);
return 0;
}
foo
Future
Incrementable
The constraint system of Concepts Lite sits on top of the existing template machinery. In particular, it does not interfere with template argument deduction. The Futures
pack is non-deducible in your example, and will remain so even with concepts.
However, it seems like the two parameter packs could be disambiguated in principle, given proper Concepts for Future and Incrementable.
You may not have picked the best example here, although that doesn't really make the premise of your question any less interesting. What do you make of this?
Future{Fut}
struct incrementable_future: Fut {
using Fut::Fut;
incrementable_future& operator++() { return *this; }
};