[llvm-bugs] [Bug 26841] New: [accepts-invalid] Member template inside a local class

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Mar 4 09:31:52 PST 2016


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

            Bug ID: 26841
           Summary: [accepts-invalid] Member template inside a local class
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ldionne.2 at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

The following code compiles successfully on Clang trunk, but it is invalid 
according to the C++14 standard:

    int main() {
        struct foo { template <typename ...> using nested = void; };
    }

The relevant part of the standard is in [temp.mem], ยง14.5.2/2:

    A local class of non-closure type shall not have member templates.

Live example: http://melpon.org/wandbox/permlink/6iFYFG3gcgzOYftp


Surprisingly, this bug is marked as fixed in bug [16947], so I guess this
is a regression.

[16947]: https://llvm.org/bugs/show_bug.cgi?id=16947

-- 
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/20160304/874d9f9e/attachment.html>


More information about the llvm-bugs mailing list