public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51507] New: [C++0x] Function parameter pack doesn't use in template-argument-list
@ 2011-12-12 7:01 digital-ghost_tsundere at hotmail dot co.jp
2011-12-22 16:07 ` [Bug c++/51507] " jason at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: digital-ghost_tsundere at hotmail dot co.jp @ 2011-12-12 7:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51507
Bug #: 51507
Summary: [C++0x] Function parameter pack doesn't use in
template-argument-list
Classification: Unclassified
Product: gcc
Version: 4.6.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: digital-ghost_tsundere@hotmail.co.jp
Following code cannot compile with gcc:
template<typename ...>
struct foo { typedef void type; };
template<typename ...Ts>
auto g(Ts ...ts)->
typename foo<decltype(ts)...>::type
{}
int main() {
g(42);
}
Error:
test1.cpp: In function 'int main()':
test1.cpp:8:9: error: expansion pattern 'int' contains no argument packs
test1.cpp:8:9: error: no matching function for call to 'g(int)'
test1.cpp:8:9: note: candidate is:
test1.cpp:4:6: note: template<class ... Ts> typename foo<decltype
(ts)...>::type g(Ts ...)
I think decltype(fs()) is a valid template-argument pattern for foo.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/51507] [C++0x] Function parameter pack doesn't use in template-argument-list
2011-12-12 7:01 [Bug c++/51507] New: [C++0x] Function parameter pack doesn't use in template-argument-list digital-ghost_tsundere at hotmail dot co.jp
@ 2011-12-22 16:07 ` jason at gcc dot gnu.org
2011-12-23 22:09 ` jason at gcc dot gnu.org
2011-12-23 23:03 ` jason at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jason at gcc dot gnu.org @ 2011-12-22 16:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51507
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011-12-22
CC| |jason at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/51507] [C++0x] Function parameter pack doesn't use in template-argument-list
2011-12-12 7:01 [Bug c++/51507] New: [C++0x] Function parameter pack doesn't use in template-argument-list digital-ghost_tsundere at hotmail dot co.jp
2011-12-22 16:07 ` [Bug c++/51507] " jason at gcc dot gnu.org
@ 2011-12-23 22:09 ` jason at gcc dot gnu.org
2011-12-23 23:03 ` jason at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jason at gcc dot gnu.org @ 2011-12-23 22:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51507
--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> 2011-12-23 22:00:21 UTC ---
Author: jason
Date: Fri Dec 23 22:00:13 2011
New Revision: 182668
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182668
Log:
PR c++/51507
* search.c (at_function_scope_p): Also check cfun.
* pt.c (tsubst_pack_expansion): Check it instead of
cp_unevaluated_operand.
(instantiate_template_1): Clear current_function_decl.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/variadic121.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/cp/search.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/51507] [C++0x] Function parameter pack doesn't use in template-argument-list
2011-12-12 7:01 [Bug c++/51507] New: [C++0x] Function parameter pack doesn't use in template-argument-list digital-ghost_tsundere at hotmail dot co.jp
2011-12-22 16:07 ` [Bug c++/51507] " jason at gcc dot gnu.org
2011-12-23 22:09 ` jason at gcc dot gnu.org
@ 2011-12-23 23:03 ` jason at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jason at gcc dot gnu.org @ 2011-12-23 23:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51507
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.7.0
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2011-12-23 22:10:33 UTC ---
Fixed for 4.7.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-23 22:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-12 7:01 [Bug c++/51507] New: [C++0x] Function parameter pack doesn't use in template-argument-list digital-ghost_tsundere at hotmail dot co.jp
2011-12-22 16:07 ` [Bug c++/51507] " jason at gcc dot gnu.org
2011-12-23 22:09 ` jason at gcc dot gnu.org
2011-12-23 23:03 ` jason at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).