Bug 66336 - [C++14][Variable templates] Spurious "error: expansion pattern contains no argument packs"
Summary: [C++14][Variable templates] Spurious "error: expansion pattern contains no ar...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 5.1.0
: P3 normal
Target Milestone: 5.3
Assignee: Jason Merrill
URL:
Keywords:
: 65706 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-05-29 09:16 UTC by lucdanton
Modified: 2015-08-06 04:13 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2015-08-05 00:00:00


Attachments
Minimal testcase (150 bytes, text/plain)
2015-05-29 09:16 UTC, lucdanton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lucdanton 2015-05-29 09:16:38 UTC
Created attachment 35651 [details]
Minimal testcase

$ g++-trunk --version
g++-trunk (GCC) 5.1.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ cat main.cpp            
template<typename>
int i {};

template<typename... Xs>
void f()
{
    // error: expansion pattern 'i<Xs>' contains no argument packs
    int is[] = { i<Xs>... };
}

int main()
{
    f<void, void, void>();
}
$ g++-trunk -std=c++14 main.cpp
main.cpp: In function 'void f()':
main.cpp:8:23: error: expansion pattern 'i<Xs>' contains no argument packs
     int is[] = { i<Xs>... };
Comment 1 Jason Merrill 2015-08-05 15:31:03 UTC
Fixed on the trunk by r225692.
Comment 2 Jason Merrill 2015-08-05 15:32:20 UTC
*** Bug 65706 has been marked as a duplicate of this bug. ***
Comment 3 Jason Merrill 2015-08-06 04:10:21 UTC
Author: jason
Date: Thu Aug  6 04:09:49 2015
New Revision: 226655

URL: https://gcc.gnu.org/viewcvs?rev=226655&root=gcc&view=rev
Log:
	PR c++/66336
	* pt.c (find_parameter_packs_r): Handle variable templates.
	(variable_template_specialization_p): New.
	* cp-tree.h: Declare it.

Added:
    branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp1y/var-templ33.C
Modified:
    branches/gcc-5-branch/gcc/cp/ChangeLog
    branches/gcc-5-branch/gcc/cp/cp-tree.h
    branches/gcc-5-branch/gcc/cp/pt.c
Comment 4 Jason Merrill 2015-08-06 04:13:34 UTC
Fixed for 5.3.