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

            Bug ID: 15482
           Summary: non-value-dependent static data member initializers
                    should be checked at template parse time if they are
                    usable in constant expressions
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Clang rejects this, claiming that 'typename' is missing:

template<int> struct X { typedef int T; };
template<typename> struct Y {
  static const int N = 0;
  X<N>::T x;
};

N is not value-dependent here, so this should work! (Likewise for constexpr
static data members.)

-- 
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