public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102104] New: parameter packs not expanded with '...' for operator conversions
@ 2021-08-27 20:22 pinskia at gcc dot gnu.org
2021-09-29 18:12 ` [Bug c++/102104] " ppalka at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-27 20:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102104
Bug ID: 102104
Summary: parameter packs not expanded with '...' for operator
conversions
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
Originally the second testcase from PR 79094 but the first one has since been
fixed.
Take -std=c++17:
template<typename A, typename B>
struct unvariadic: private A, private B {
// okay, provided A and B each declare appropriate
// target_type and operator target_type() members
using A::operator typename A::target_type,
B::operator typename B::target_type;
};
template<typename... Bases>
struct variadic: private Bases... {
// error: parameter packs not expanded with '...':
using Bases::operator typename Bases::target_type...;
};
This should compile just as ICC and clang do.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/102104] parameter packs not expanded with '...' for operator conversions
2021-08-27 20:22 [Bug c++/102104] New: parameter packs not expanded with '...' for operator conversions pinskia at gcc dot gnu.org
@ 2021-09-29 18:12 ` ppalka at gcc dot gnu.org
2021-09-30 12:41 ` ppalka at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-09-29 18:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102104
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppalka at gcc dot gnu.org
Ever confirmed|0 |1
Last reconfirmed| |2021-09-29
Status|UNCONFIRMED |NEW
--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
We also reject the following, with a different error message:
template<typename T, typename... Bases>
struct variadic: private Bases... {
// error: expansion pattern ‘T’ contains no parameter packs
using T::operator typename Bases::target_type...;
};
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/102104] parameter packs not expanded with '...' for operator conversions
2021-08-27 20:22 [Bug c++/102104] New: parameter packs not expanded with '...' for operator conversions pinskia at gcc dot gnu.org
2021-09-29 18:12 ` [Bug c++/102104] " ppalka at gcc dot gnu.org
@ 2021-09-30 12:41 ` ppalka at gcc dot gnu.org
2022-12-15 23:50 ` cvs-commit at gcc dot gnu.org
2022-12-15 23:51 ` ppalka at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-09-30 12:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102104
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/102104] parameter packs not expanded with '...' for operator conversions
2021-08-27 20:22 [Bug c++/102104] New: parameter packs not expanded with '...' for operator conversions pinskia at gcc dot gnu.org
2021-09-29 18:12 ` [Bug c++/102104] " ppalka at gcc dot gnu.org
2021-09-30 12:41 ` ppalka at gcc dot gnu.org
@ 2022-12-15 23:50 ` cvs-commit at gcc dot gnu.org
2022-12-15 23:51 ` ppalka at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-15 23:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102104
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:e79d51963378b10ab90544a7d8eeb6266e9a57f6
commit r13-4734-ge79d51963378b10ab90544a7d8eeb6266e9a57f6
Author: Patrick Palka <ppalka@redhat.com>
Date: Thu Dec 15 18:50:16 2022 -0500
c++: variadic using-decl with parm pack in terminal name [PR102104]
There's a curious corner case with variadic member using-decls: the
terminal name can also contain a parameter pack, and only through naming
a conversion function, e.g.
using A<Ts>::operator Ts...;
We currently only handle parameter packs appearing in the qualifying
scope of a variadic using-decl; this patch adds support for the above
case as well, representing such a using-decl via two pack expansions,
one for the qualifying scope and one for the terminal name (despite
logically there being just one). Then at instantiation time we manually
merge them.
PR c++/102104
PR c++/108090
gcc/cp/ChangeLog:
* error.cc (dump_decl) <case USING_DECL>: Look through a
pack expansion in the name as well.
* parser.cc (cp_parser_using_declaration): Handle a parameter
pack appearing in the terminal name of a variadic using-decl.
* pt.cc (tsubst_decl) <case USING_DECL>: Likewise. Combine the
handling of variadic and non-variadic using-decls.
gcc/testsuite/ChangeLog:
* g++.dg/cpp1z/using-variadic1.C: New test.
* g++.dg/cpp1z/using-variadic1a.C: New test.
* g++.dg/cpp1z/using-variadic1b.C: New test.
* g++.dg/cpp1z/using-variadic1c.C: New test.
* g++.dg/cpp1z/using-variadic2.C: New test.
* g++.dg/cpp1z/using-variadic3.C: New test.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/102104] parameter packs not expanded with '...' for operator conversions
2021-08-27 20:22 [Bug c++/102104] New: parameter packs not expanded with '...' for operator conversions pinskia at gcc dot gnu.org
` (2 preceding siblings ...)
2022-12-15 23:50 ` cvs-commit at gcc dot gnu.org
@ 2022-12-15 23:51 ` ppalka at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-12-15 23:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102104
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.0
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed for GCC 13.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-12-15 23:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 20:22 [Bug c++/102104] New: parameter packs not expanded with '...' for operator conversions pinskia at gcc dot gnu.org
2021-09-29 18:12 ` [Bug c++/102104] " ppalka at gcc dot gnu.org
2021-09-30 12:41 ` ppalka at gcc dot gnu.org
2022-12-15 23:50 ` cvs-commit at gcc dot gnu.org
2022-12-15 23:51 ` ppalka 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).