[LLVMbugs] [Bug 20531] New: Error message when explicitly instantiating a template class via a template alias

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Aug 4 05:38:49 PDT 2014


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

            Bug ID: 20531
           Summary: Error message when explicitly instantiating a template
                    class via a template alias
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: gonzalobg88 at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The following code snippet:

template<class T>
struct A { };

/// Explicit instantiate A for int:
template struct A<int>;

/// Alias
template<class T>
using B = A<T>;

/// Explicitly instantiate A for double via alias B:
template struct B<double>;

Produces the following error:

error: elaborated type refers to a non-tag type

This made me scratch my head a bit since "explicitly instantiating a template
class via a template alias is illegal" but the message didn't convey me that
information [0]. 


[0]
http://stackoverflow.com/questions/25118191/explicitly-instantiate-class-through-template-alias?noredirect=1#comment39093221_25118191

-- 
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/20140804/9a786e63/attachment.html>


More information about the llvm-bugs mailing list