I am learning about templates in C++. In particular, i saw here that we can have the following declaration for the constructor:
template<typename T>
struct Rational
{
Rational<T>();
};
But the above snippet fails to compile in C++2a and compiles successfully for C++17.
Is this a compiler bug or there is a reason why it doesn't compile for C++2a and C++2b. If there is a reason then what is it. I want to know which clauses(if any) from the standard allow/prevent the following examples to compile. Since i have tested the above example with C++17 and C++20 so i am looking for citation from only these two standard versions.