I have the following class interface:
template <typename D, typename... Cs>
struct Foo {
Foo(int other_variable, Cs&&... cs) :
tuple {std::make_tuple(std::forward<Cs>(cs)...)} {
}
std::tuple<Cs...> tuple;
};
It fails to compile with the following code:
Foo<float> foo(1,
[]() { /* lambda type 1 */ },
[](std::string) { /* lambda type 2 */ },
[](int) { /* lambda type 3 */ }
);
I had the impression that I need to provide a deduction guide but the following guide doesn't work:
template <typename D, typename... Cs> Foo(int, Cs&&...) -> Foo<D, Cs...>;