This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/67397] New: GCC incorrectly accepts non-type template parameter pack expansion of a parameter pack declared in the same template-parameter-list
- From: "brunocodutra at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 30 Aug 2015 00:53:22 +0000
- Subject: [Bug c++/67397] New: GCC incorrectly accepts non-type template parameter pack expansion of a parameter pack declared in the same template-parameter-list
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67397
Bug ID: 67397
Summary: GCC incorrectly accepts non-type template parameter
pack expansion of a parameter pack declared in the
same template-parameter-list
Product: gcc
Version: 5.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: brunocodutra at gmail dot com
Target Milestone: ---
The following is incorrectly accepted by GCC (and clang 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."