Stack Exchange
CTAD and template constructor with member with parameter pack
Trying to use universal references with CTAD and parameter pack I tried something like below, but it doesn't compile on MinGW GCC. And I don't understand why.
This is the sample code:
#include <utility>

template<typename... Ts>
struct Subtest
{
    Subtest(Ts...) {}
};

template<typename... Ts>
struct Test
{
    template<typename... Us>
    Test( Us&&... values1 )
    : values( std::forward<Us>( values1 )... )
    {}

    Subtest<Ts...> values;
};

template<typename... Ts>
Test(Ts&&...) -> Test<std::remove_reference_t<Ts>...>;


int main()
{
    Test t(12, 14);

    return 0;
}

These are the errors:
main.cpp: In instantiation of 'Test<Ts>::Test(Us&& ...) [with Us = {int, int}; Ts = {}]':
main.cpp:26:18:   required from here
main.cpp:14:46: error: no matching function for call to 'Subtest<>::Subtest(int, int)'
   14 |     : values( std::forward<Us>( values1 )... )
      |                                              ^
main.cpp:6:5: note: candidate: 'Subtest<Ts>::Subtest(Ts ...) [with Ts = {}]'
    6 |     Subtest(Ts...) {}
      |     ^~~~~~~
main.cpp:6:5: note:   candidate expects 0 arguments, 2 provided
main.cpp:4:8: note: candidate: 'constexpr Subtest<>::Subtest(const Subtest<>&)'
    4 | struct Subtest
      |        ^~~~~~~
main.cpp:4:8: note:   candidate expects 1 argument, 2 provided
main.cpp:4:8: note: candidate: 'constexpr Subtest<>::Subtest(Subtest<>&&)'
main.cpp:4:8: note:   candidate expects 1 argument, 2 provided


Compiles fine on gcc. Probably a mingw bug.

@cigien it is a gcc bug in all versions before 10.2
