The following fails to compile with gcc 8.2 -std=c++17, with or without deduction guide, but compiles with clang (even clang 5) and latest msvc as you can see here.
template <class... Ts>
struct A
{
template <class... T>
A(T... any)
: tuple_{std::tuple{any...}}
{
}
std::tuple<Ts...> tuple_;
};
template<class ... T>
A(T... any)->A<decltype(any)...>;
int main()
{
auto f = [](int){};
auto a1 = A{7};
auto a2 = A{f,7};
}
As far as I can tell I am not doing anything too strange here, and I thought it would be a typical use case for CTAD.
The question is, which compiler is right?