public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98617] New: Failure to recognize pack expansion argument for non-pack parameter of alias template when alias is "exact"
@ 2021-01-10 19:03 ryan_greenblatt at brown dot edu
2021-05-18 20:06 ` [Bug c++/98617] " redi at gcc dot gnu.org
2021-05-18 20:07 ` redi at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: ryan_greenblatt at brown dot edu @ 2021-01-10 19:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98617
Bug ID: 98617
Summary: Failure to recognize pack expansion argument for
non-pack parameter of alias template when alias is
"exact"
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ryan_greenblatt at brown dot edu
Target Milestone: ---
It is invalid to expand a parameter pack into a non pack parameter of an alias
template. However, gcc accepts this when the alias is exactly the same as the
struct it is aliasing.
Consider https://godbolt.org/z/YrqTTx
AliasA doesn't fail, but it should fail with the same error as AliasB and
AliasC.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/98617] Failure to recognize pack expansion argument for non-pack parameter of alias template when alias is "exact"
2021-01-10 19:03 [Bug c++/98617] New: Failure to recognize pack expansion argument for non-pack parameter of alias template when alias is "exact" ryan_greenblatt at brown dot edu
@ 2021-05-18 20:06 ` redi at gcc dot gnu.org
2021-05-18 20:07 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2021-05-18 20:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98617
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2021-05-18
Status|UNCONFIRMED |NEW
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/98617] Failure to recognize pack expansion argument for non-pack parameter of alias template when alias is "exact"
2021-01-10 19:03 [Bug c++/98617] New: Failure to recognize pack expansion argument for non-pack parameter of alias template when alias is "exact" ryan_greenblatt at brown dot edu
2021-05-18 20:06 ` [Bug c++/98617] " redi at gcc dot gnu.org
@ 2021-05-18 20:07 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2021-05-18 20:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98617
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Please provide the actual code, not only a CE link:
template <typename T, typename V> struct Base {};
template <typename T, typename V> using A = Base<T, V>;
template <typename T> using B = Base<T, int>;
template <typename T, typename V, typename> using C = Base<T, V>;
template<typename...T>
using AliasA = A<T...>; // this should fail
template<typename...T>
using AliasB = B<T...>;
template<typename...T>
using AliasC = C<T...>;
Reduced to remove the bits that do fail as expected:
template <typename T, typename V> struct Base {};
template <typename T, typename V> using A = Base<T, V>;
template<typename...T>
using AliasA = A<T...>; // this should fail
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-18 20:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-10 19:03 [Bug c++/98617] New: Failure to recognize pack expansion argument for non-pack parameter of alias template when alias is "exact" ryan_greenblatt at brown dot edu
2021-05-18 20:06 ` [Bug c++/98617] " redi at gcc dot gnu.org
2021-05-18 20:07 ` redi 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).