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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to