[LLVMbugs] [Bug 13744] New: Incorrect decltype handling in template specializations

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Aug 31 11:06:17 PDT 2012


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

             Bug #: 13744
           Summary: Incorrect decltype handling in template
                    specializations
           Product: clang
           Version: 3.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rivorus_katarni at yahoo.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


The following produces "error: expected ')'", pointing to the greater than sign
in the decltype argument. Using >> also produces the same error. It seems as
though Clang is trying to end the specialization argument list, but it
shouldn't since the expression is clearly in parentheses. Note that this error
only seems to occur when using decltype in this manner -- a similar situation
using sizeof or alignas and non-type template parameters does not produce an
error.

//////////
template< class > struct foo;

template<> struct foo< decltype( 1 > 1 ) >;
//////////

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list