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

             Bug #: 14858
           Summary: Parameter pack expanded into alias template
                    incorrectly
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified


count::value should equal sizeof...(T) in this code, but is always 1, causing
the assertions to fail.

Tested with clang 3.0 and 3.3 (trunk 170278)



template<int N> struct Int { static const int value = N; };

template<typename... T>
  using Count = Int<sizeof...(T)>;

template<typename... T>
struct test
{
  typedef Count< T... > count;

  static_assert( count::value == sizeof...(T), "clang can count" );
};

template struct test<int>;        // OK

template struct test<>;         // fails

template struct test<int, int>;     // fails

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

Reply via email to