public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109291] New: type alias template rejects pack
@ 2023-03-27 8:52 ncm at cantrip dot org
2023-03-27 15:30 ` [Bug c++/109291] " pinskia at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: ncm at cantrip dot org @ 2023-03-27 8:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109291
Bug ID: 109291
Summary: type alias template rejects pack
Product: gcc
Version: 12.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ncm at cantrip dot org
Target Milestone: ---
template <typename T>
struct type_identity { using type = T; };
template <typename T>
using type_identity_t = typename type_identity<T>::type;
template <typename ...Ts>
struct S1 { using alias1 = typename type_identity<Ts...>::type; };
template <typename ...Ts>
struct S2 { using alias2 = typename type_identity_t<Ts...>; };
int main() {
S1<int>::alias1 a; // OK
S2<int>::alias2 b; // Fails
}
// Here, alias1 is fine, but alias2, the same type, is not.
// MSVC accepts both declarations. Clang matches Gcc.
// error: pack expansion argument for non-pack parameter ‘T’ of alias template
// error: expected nested-name-specifier
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/109291] type alias template rejects pack
2023-03-27 8:52 [Bug c++/109291] New: type alias template rejects pack ncm at cantrip dot org
@ 2023-03-27 15:30 ` pinskia at gcc dot gnu.org
2023-03-27 19:24 ` ncm at cantrip dot org
2023-03-27 19:30 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-03-27 15:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109291
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 59498.
There is a defect in the C++ standard here ...
*** This bug has been marked as a duplicate of bug 59498 ***
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/109291] type alias template rejects pack
2023-03-27 8:52 [Bug c++/109291] New: type alias template rejects pack ncm at cantrip dot org
2023-03-27 15:30 ` [Bug c++/109291] " pinskia at gcc dot gnu.org
@ 2023-03-27 19:24 ` ncm at cantrip dot org
2023-03-27 19:30 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: ncm at cantrip dot org @ 2023-03-27 19:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109291
--- Comment #2 from ncm at cantrip dot org ---
CWG 1430 is still marked Open, and is anyway only superficially
analogous. Here, there is no need for an alias to be encoded
into a type signature.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/109291] type alias template rejects pack
2023-03-27 8:52 [Bug c++/109291] New: type alias template rejects pack ncm at cantrip dot org
2023-03-27 15:30 ` [Bug c++/109291] " pinskia at gcc dot gnu.org
2023-03-27 19:24 ` ncm at cantrip dot org
@ 2023-03-27 19:30 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-03-27 19:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109291
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to ncm from comment #2)
> CWG 1430 is still marked Open, and is anyway only superficially
> analogous. Here, there is no need for an alias to be encoded
> into a type signature.
Right and yes PR 59498 is still open so ...
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-27 19:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-27 8:52 [Bug c++/109291] New: type alias template rejects pack ncm at cantrip dot org
2023-03-27 15:30 ` [Bug c++/109291] " pinskia at gcc dot gnu.org
2023-03-27 19:24 ` ncm at cantrip dot org
2023-03-27 19:30 ` pinskia 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).