public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/57384] New: can't expand a parameter pack into a list of function types or function pointer types
@ 2013-05-23 6:51 eric.niebler at gmail dot com
2013-05-23 9:14 ` [Bug c++/57384] " redi at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: eric.niebler at gmail dot com @ 2013-05-23 6:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57384
Bug ID: 57384
Summary: can't expand a parameter pack into a list of function
types or function pointer types
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
I believe all of the following 4 test cases should pass:
template<typename ...Ts>
struct list
{};
template<typename ...Ts>
struct S
{
using type1 = void(int...(Ts)); // fails
using type2 = list<int...(Ts)>; // fails
using type3 = void(int(*...)(Ts)); // fails
using type4 = list<int(*...)(Ts)>; // works with 4.7, fails with 4.8
};
Currently (i.e. with gcc-4.8), 1-4 all fail. With gcc-4.7, (4) worked. I'm
compiling with -std=gnu++11
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/57384] can't expand a parameter pack into a list of function types or function pointer types
2013-05-23 6:51 [Bug c++/57384] New: can't expand a parameter pack into a list of function types or function pointer types eric.niebler at gmail dot com
@ 2013-05-23 9:14 ` redi at gcc dot gnu.org
2013-05-23 16:37 ` daniel.kruegler at googlemail dot com
2013-05-23 21:57 ` eric.niebler at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2013-05-23 9:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57384
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Eric Niebler from comment #0)
> I believe all of the following 4 test cases should pass:
I'll leave it to someone else to rule on that, they make my head hurt ;)
I will note that this works:
using type2 = list<int(Ts)...>;
and this works:
using type4 = list<int(*)(Ts)...>;
And of course all these work:
template<class X>
using F = int(X);
using type1 = void(F<Ts>...);
using type2 = list<F<Ts>...>;
template<class X>
using Fp = int(*)(X);
using type3 = void(Fp<Ts>...);
using type4 = list<Fp<Ts>...>;
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/57384] can't expand a parameter pack into a list of function types or function pointer types
2013-05-23 6:51 [Bug c++/57384] New: can't expand a parameter pack into a list of function types or function pointer types eric.niebler at gmail dot com
2013-05-23 9:14 ` [Bug c++/57384] " redi at gcc dot gnu.org
@ 2013-05-23 16:37 ` daniel.kruegler at googlemail dot com
2013-05-23 21:57 ` eric.niebler at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2013-05-23 16:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57384
--- Comment #2 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
I have the impression that this *could* be related to
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1488
This is unchecked yet, because I'm leaving my place here.
>From gcc-bugs-return-422975-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu May 23 17:04:03 2013
Return-Path: <gcc-bugs-return-422975-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 18253 invoked by alias); 23 May 2013 17:04:03 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 18208 invoked by uid 48); 23 May 2013 17:03:55 -0000
From: "paolo.carlini at oracle dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57388] [C++11] ICE when function types with ref-qualifiers meet other function types
Date: Thu, 23 May 2013 17:04:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: paolo.carlini at oracle dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-57388-4-m6vQ3Mv5ky@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57388-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57388-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-05/txt/msg01648.txt.bz2
Content-length: 147
http://gcc.gnu.org/bugzilla/show_bug.cgi?idW388
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Let's add Jason in CC.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/57384] can't expand a parameter pack into a list of function types or function pointer types
2013-05-23 6:51 [Bug c++/57384] New: can't expand a parameter pack into a list of function types or function pointer types eric.niebler at gmail dot com
2013-05-23 9:14 ` [Bug c++/57384] " redi at gcc dot gnu.org
2013-05-23 16:37 ` daniel.kruegler at googlemail dot com
@ 2013-05-23 21:57 ` eric.niebler at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: eric.niebler at gmail dot com @ 2013-05-23 21:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57384
--- Comment #3 from Eric Niebler <eric.niebler at gmail dot com> ---
Interesting. I filed a similar bug against clang
(http://llvm.org/bugs/show_bug.cgi?id=16118), where Richard Smith seems to feel
the test cases should be:
template<typename ...Ts>
struct list
{};
template<typename ...Ts>
struct S
{
using type1 = void(int...(Ts)); // (1) fails
using type2 = list<int(Ts)...>; // (2) works
using type3 = void(int(*...)(Ts)); // (3) fails
using type4 = list<int(*)(Ts)...>; // (4) works
};
This strikes me as ludicrously inconsistent. I think we need guidance from the
committee here. I was basing my bug report(s) on the example in 8.3.5/13 (which
shows:
template<typename... T> void f(T (* ...t)(int, int));
The suggestion that the pack expansion syntax differs depending on the context
in which the expansion occurs is, um, unsatisfactory.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-23 21:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-23 6:51 [Bug c++/57384] New: can't expand a parameter pack into a list of function types or function pointer types eric.niebler at gmail dot com
2013-05-23 9:14 ` [Bug c++/57384] " redi at gcc dot gnu.org
2013-05-23 16:37 ` daniel.kruegler at googlemail dot com
2013-05-23 21:57 ` eric.niebler at gmail dot com
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).