[LLVMbugs] [Bug 20570] New: clang C++ partial specialization of nested template (reject valid)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Aug 6 15:06:03 PDT 2014


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

            Bug ID: 20570
           Summary: clang C++ partial specialization of nested template
                    (reject valid)
           Product: clang
           Version: 3.4
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: reagentoo at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Bug appears when you try to specialize template within another template.

Minimal snippet:
=============================
template <class>
struct Foo
{
    template <class>
    struct Bar;
};

template <class T>
template <>
struct Foo<T>::Bar<int>
{};
=============================

However, if you add an one additional (undeductional) parameter in the
specialization, the code is compiled. "template <class>" instead of "template
<>".

Minimal snippet (is working):
=============================
template <class>
struct Foo
{
    template <class>
    struct Bar;
};

template <class T>
template <class>
struct Foo<T>::Bar<int>
{};
=============================

-- 
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/20140806/d2cdfbb2/attachment.html>


More information about the llvm-bugs mailing list