[Bug c++/104113] DR 625 forbids "auto" being used in template argument and parser fails to issue correct error message for it

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 19 11:01:28 GMT 2022


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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Auto has nothing to do with the problematic error message, take:
template<typename T>
struct A{};
A<tttt> x = A<short>();

GCC still produces:

<source>:4:13: error: cannot convert 'A<short int>' to 'int' in initialization
    4 | A<tttt> x = A<short>();
      |             ^~~~~~~~~~
      |             |
      |             A<short int>


More information about the Gcc-bugs mailing list