[Bug c++/70943] New: 'conflicting declaration' error with repeated typedefs in function templates

rs2740 at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed May 4 09:58:00 GMT 2016


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

            Bug ID: 70943
           Summary: 'conflicting declaration' error with repeated typedefs
                    in function templates
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rs2740 at gmail dot com
  Target Milestone: ---

template<class T>
void foo(T t) {
    using meow = T;
    using meow = int;
}

template void foo(int);

Accepted by clang, rejected by GCC:

main.cpp: In function 'void foo(T)':
main.cpp:4:21: error: conflicting declaration 'using meow = '
     using meow = int;
                     ^
main.cpp:3:19: note: previous declaration as 'using meow = T'
     using meow = T;


More information about the Gcc-bugs mailing list