On 5/3/2021 9:33 AM, Andrey Tarasevich wrote:
>
> But it is not the case in GCC. Who's right here? GCC? Or MSVC++ and Clang?
>
OK, I see that the standard is rather straightforward about it
"The set of default template-arguments available for use is obtained by
merging the default arguments from all prior declarations of the
template in the same way default function arguments are
([dcl.fct.default]).
[Example 6:
template<class T1, class T2 = int> class A;
template<class T1 = int, class T2> class A;
is equivalent to
template<class T1 = int, class T2 = int> class A;
— end example]"
http://eel.is/c++draft/temp.param#13
So, this is indeed a bug in GCC.