gcc and msvc accept such code but produces different results. is this code (in)valid? i'm not sure what behaviour is correct.
Created attachment 12569 [details] testcase
This is valid code ...
as far as I can tell, GCC is incorrect in not using the specialized template. In fact I replace A with int, it gives the correct output.
This is a duplicate of another PR where we forget to substitute an outer template argument in the specialization of an inner template. I think it concerned a boolean value in that case, rather than a type. W.
(In reply to comment #4) > This is a duplicate of another PR where we forget to substitute an > outer template argument in the specialization of an inner template. > I think it concerned a boolean value in that case, rather than a type. That is PR 14032.
Indeed. They are duplicates. *** This bug has been marked as a duplicate of 14032 ***
(In reply to comment #0) > gcc and msvc accept such code but produces different results. > is this code (in)valid? i'm not sure what behaviour is correct. The code is valid because it is a *partial* specialization of the member template class. It would be invalid if it were a *complete* specialization. In that case, the complete specialization would have to be declared outside the outer class, i.e. at namespace scope.