[llvm-bugs] [Bug 24625] New: Clang incorrectly accepts non-type template parameter pack expansion of a parameter pack declared in the same template-parameter-list

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Aug 29 17:41:30 PDT 2015


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

            Bug ID: 24625
           Summary: Clang incorrectly accepts non-type template parameter
                    pack expansion of a parameter pack declared in the
                    same template-parameter-list
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: brunocodutra at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

The following is incorrectly accepted by clang (and GCC but not MSVC 14)

template<typename...>
struct foo;

template<typename... t, t... v>
struct foo<std::integral_constant<t, v>...>
{
    using type = foo;
};

using bar = foo<std::integral_constant<int, -1>, std::true_type>::type;

[temp.param]/p15:

"A template parameter pack that is a pack expansion shall not expand a
parameter pack declared in the same template-parameter-list."

-- 
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/20150830/ed0358b5/attachment.html>


More information about the llvm-bugs mailing list