For the following code:
struct S
{
S() = default;
S(S const&) = default;
S(S&&) = default;
S& operator=(S const& other) = default;
S& operator=(S&&) = default;
template <typename... T>
S(T&&... params)
{
}
};
int main()
{
S s;
return 0;
}
I get an error message:
Error C2580 'S::S(void)': multiple versions of a defaulted special member functions are not allowed
Whic I don't understand. I think that the error is caused by the templated constructor (Verified this by commenting it out and got the program compiled).