[llvm-bugs] [Bug 31765] New: incorrectly permitting definition of class template via injected-class-name

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jan 25 18:29:05 PST 2017


https://llvm.org/bugs/show_bug.cgi?id=31765

            Bug ID: 31765
           Summary: incorrectly permitting definition of class template
                    via injected-class-name
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

Clang accepts this:

  template<typename T> struct A {};
  template<typename T> struct A<T>::A {};

It's not obvious whether this is a valid use of the injected-class-name (the
standard doesn't say the lookup in a class-head ignores functions, but it must
do), but this should produce a redefinition error if nothing else.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170126/53746c05/attachment.html>


More information about the llvm-bugs mailing list