[LLVMbugs] [Bug 15482] New: non-value-dependent static data member initializers should be checked at template parse time if they are usable in constant expressions

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Mar 9 12:36:55 PST 2013


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: unassignedclangbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130309/e322fb9b/attachment.html>


More information about the llvm-bugs mailing list