[LLVMbugs] [Bug 23410] New: Variable template cannot be used in template template argument

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon May 4 13:49:09 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23410

            Bug ID: 23410
           Summary: Variable template cannot be used in template template
                    argument
           Product: clang
           Version: 3.6
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++14
          Assignee: unassignedclangbugs at nondot.org
          Reporter: cube2killfield at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The following code fails to compile:
--------------------------------------------------
template <template <typename> class V, typename T>
struct foo {
    static constexpr auto value = V<T>;
};

template <typename T>
T bar = T(5);

int main() {
    foo<bar, int>::value;
}
-------------------------------------------------

It seems clang expects a function-style cast or
type construction on the line:
-------------------------------------------------
static constexpr auto value = V<T>;
-------------------------------------------------

-- 
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/20150504/10afc89a/attachment.html>


More information about the llvm-bugs mailing list