https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82347

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-06-27
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=66350
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Reduced:

template<typename> class vector { vector() { } };

vector<int>* f()
{
    using a = typename vector<int>::vector;
    return (a*)0;
}


Clang grudgingly accepts it:

82347.cc:5:37: warning: ISO C++ specifies that qualified reference to 'vector'
is a constructor name rather than a type in this context, despite preceding
'typename' keyword [-Winjected-class-name]
    using a = typename vector<int>::vector;
                                    ^
1 warning generated.

EDG doesn't:
"82347.cc", line 5: error: overloaded function "vector<<unnamed>>::vector [with
          <unnamed>=int]" is not a type name
      using a = typename vector<int>::vector;
                         ^

1 error detected in the compilation of "82347.cc".


See also PR 66350.

Reply via email to