[LLVMbugs] [Bug 17947] New: The following code should compile

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Nov 15 09:47:42 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=17947

            Bug ID: 17947
           Summary: The following code should compile
           Product: clang
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jeffrey.pigarelli at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This code:

#include <cstddef>
#include <iostream>

template<std::size_t R, std::size_t C>
struct foo {};

template<std::size_t R, std::size_t C>
class bar {
public:
    bar(const foo<R, C>& = foo<R, C>()) {}
};

int main() {
    bar<10, 10> y;
    std::cout << 'x';
}

fails to compile claiming an "error: unknown type name 'C'". The above code
seems to be legal according to the C++ standard draft: N3337.

Here's a link to the SO question that raise the issue:
http://stackoverflow.com/q/20006779/493122.

-- 
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/20131115/df21712d/attachment.html>


More information about the llvm-bugs mailing list