public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/48521] [4.5/4.6/4.7 Regression] [C++0x] std::result_of doesn't work with pointer to member
2011-04-08 21:16 [Bug libstdc++/48521] New: [4.5/4.6/4.7 Regression] [C++0x] std::result_of doesn't work with pointer to member redi at gcc dot gnu.org
@ 2011-04-08 21:16 ` redi at gcc dot gnu.org
2011-04-09 10:55 ` redi at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2011-04-08 21:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48521
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011.04.08 21:16:52
AssignedTo|unassigned at gcc dot |redi at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/48521] New: [4.5/4.6/4.7 Regression] [C++0x] std::result_of doesn't work with pointer to member
@ 2011-04-08 21:16 redi at gcc dot gnu.org
2011-04-08 21:16 ` [Bug libstdc++/48521] " redi at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2011-04-08 21:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48521
Summary: [4.5/4.6/4.7 Regression] [C++0x] std::result_of
doesn't work with pointer to member
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: redi@gcc.gnu.org
This is supposed to work, and did with 4.4:
#include <functional>
struct X
{
int foo();
};
typedef int (X::*pm)();
std::result_of<pm()>::type i = 0;
This means we don't accept std::async(X::foo, ...) which is defined in terms of
result_of
I think I intentionally removed support for pointers to members from result_of,
because an earlier C++0x draft said it shouldn't work
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/48521] [4.5/4.6/4.7 Regression] [C++0x] std::result_of doesn't work with pointer to member
2011-04-08 21:16 [Bug libstdc++/48521] New: [4.5/4.6/4.7 Regression] [C++0x] std::result_of doesn't work with pointer to member redi at gcc dot gnu.org
2011-04-08 21:16 ` [Bug libstdc++/48521] " redi at gcc dot gnu.org
@ 2011-04-09 10:55 ` redi at gcc dot gnu.org
2011-04-16 19:53 ` redi at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2011-04-09 10:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48521
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-04-09 10:55:02 UTC ---
(In reply to comment #0)
> This means we don't accept std::async(X::foo, ...)
Oops, meant to say std::async(&X::foo, ...)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/48521] [4.5/4.6/4.7 Regression] [C++0x] std::result_of doesn't work with pointer to member
2011-04-08 21:16 [Bug libstdc++/48521] New: [4.5/4.6/4.7 Regression] [C++0x] std::result_of doesn't work with pointer to member redi at gcc dot gnu.org
2011-04-08 21:16 ` [Bug libstdc++/48521] " redi at gcc dot gnu.org
2011-04-09 10:55 ` redi at gcc dot gnu.org
@ 2011-04-16 19:53 ` redi at gcc dot gnu.org
2011-04-16 23:12 ` paolo.carlini at oracle dot com
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2011-04-16 19:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48521
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-04-16 19:53:27 UTC ---
I have a fix for this now, as well as a few issues in <functional> such as LWG
2017, 2021, missing deleted ref/cref overloads etc.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/48521] [4.5/4.6/4.7 Regression] [C++0x] std::result_of doesn't work with pointer to member
2011-04-08 21:16 [Bug libstdc++/48521] New: [4.5/4.6/4.7 Regression] [C++0x] std::result_of doesn't work with pointer to member redi at gcc dot gnu.org
` (2 preceding siblings ...)
2011-04-16 19:53 ` redi at gcc dot gnu.org
@ 2011-04-16 23:12 ` paolo.carlini at oracle dot com
2011-04-17 20:28 ` redi at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-04-16 23:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48521
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-04-16 23:11:57 UTC ---
Excellent!
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/48521] [4.5/4.6/4.7 Regression] [C++0x] std::result_of doesn't work with pointer to member
2011-04-08 21:16 [Bug libstdc++/48521] New: [4.5/4.6/4.7 Regression] [C++0x] std::result_of doesn't work with pointer to member redi at gcc dot gnu.org
` (3 preceding siblings ...)
2011-04-16 23:12 ` paolo.carlini at oracle dot com
@ 2011-04-17 20:28 ` redi at gcc dot gnu.org
2011-04-18 21:44 ` redi at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2011-04-17 20:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48521
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-04-17 20:28:36 UTC ---
I'm just trying to figure out whether to enumerate every type of member
function w.r.t cv-qualifiers and ref-qualifiers and varargs as I think that's 8
partial specializations (24 when we get support for ref-qualifiers on member
functions!) some of which are missing for mem_fn/_Mem_fn (see my mails to the
reflector)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/48521] [4.5/4.6/4.7 Regression] [C++0x] std::result_of doesn't work with pointer to member
2011-04-08 21:16 [Bug libstdc++/48521] New: [4.5/4.6/4.7 Regression] [C++0x] std::result_of doesn't work with pointer to member redi at gcc dot gnu.org
` (4 preceding siblings ...)
2011-04-17 20:28 ` redi at gcc dot gnu.org
@ 2011-04-18 21:44 ` redi at gcc dot gnu.org
2011-04-19 13:26 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2011-04-18 21:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48521
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-04-18 21:43:36 UTC ---
(In reply to comment #0)
> This is supposed to work, and did with 4.4:
>
> #include <functional>
> struct X
> {
> int foo();
> };
>
> typedef int (X::*pm)();
> std::result_of<pm()>::type i = 0;
Bah, that shouldn't work! But this should:
std::result_of<pm(X)>::type i = 0;
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/48521] [4.5/4.6/4.7 Regression] [C++0x] std::result_of doesn't work with pointer to member
2011-04-08 21:16 [Bug libstdc++/48521] New: [4.5/4.6/4.7 Regression] [C++0x] std::result_of doesn't work with pointer to member redi at gcc dot gnu.org
` (5 preceding siblings ...)
2011-04-18 21:44 ` redi at gcc dot gnu.org
@ 2011-04-19 13:26 ` redi at gcc dot gnu.org
2011-04-19 13:28 ` [Bug libstdc++/48521] [4.5/4.6 " redi at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2011-04-19 13:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48521
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-04-19 13:26:15 UTC ---
Author: redi
Date: Tue Apr 19 13:26:08 2011
New Revision: 172709
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172709
Log:
2011-04-19 Jonathan Wakely <jwakely.gcc@gmail.com>
PR libstdc++/48521
* include/std/type_traits (result_of): Handle pointer to member.
* include/std/functional (__invoke): Likewise.
(_Function_to_function_pointer): Remove.
(_Reference_wrapper_base): Provide nested types independent of
unary_function and binary_function.
(reference_wrapper::operator()): DR 2017.
(ref(const A&&), cref(const A&&): Define as deleted.
* include/std/future (async): Simplify SFINAE and use result_of to
support pointer to member.
* testsuite/20_util/reference_wrapper/invoke.cc: Test pointer to
member.
* testsuite/20_util/reference_wrapper/24803.cc: Likewise.
* testsuite/20_util/reference_wrapper/typedefs.cc: Test for types
instead of derivation from unary_function and binary_function.
* testsuite/20_util/declval/requirements/1_neg.cc: Adjust.
* testsuite/20_util/reference_wrapper/invoke-2.cc: New.
* testsuite/20_util/reference_wrapper/ref_neg.c: New.
* testsuite/20_util/reference_wrapper/typedefs-3.c: New.
Added:
trunk/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke-2.cc
trunk/libstdc++-v3/testsuite/20_util/reference_wrapper/ref_neg.cc
trunk/libstdc++-v3/testsuite/20_util/reference_wrapper/typedefs-3.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/functional
trunk/libstdc++-v3/include/std/future
trunk/libstdc++-v3/include/std/type_traits
trunk/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
trunk/libstdc++-v3/testsuite/20_util/reference_wrapper/24803.cc
trunk/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc
trunk/libstdc++-v3/testsuite/20_util/reference_wrapper/typedefs.cc
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/48521] [4.5/4.6 Regression] [C++0x] std::result_of doesn't work with pointer to member
2011-04-08 21:16 [Bug libstdc++/48521] New: [4.5/4.6/4.7 Regression] [C++0x] std::result_of doesn't work with pointer to member redi at gcc dot gnu.org
` (6 preceding siblings ...)
2011-04-19 13:26 ` redi at gcc dot gnu.org
@ 2011-04-19 13:28 ` redi at gcc dot gnu.org
2011-04-23 17:51 ` redi at gcc dot gnu.org
2011-04-23 17:55 ` [Bug libstdc++/48521] [4.5 " redi at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2011-04-19 13:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48521
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.7.0
Target Milestone|--- |4.6.1
Summary|[4.5/4.6/4.7 Regression] |[4.5/4.6 Regression]
|[C++0x] std::result_of |[C++0x] std::result_of
|doesn't work with pointer |doesn't work with pointer
|to member |to member
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-04-19 13:28:33 UTC ---
Fixed on trunk so far
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/48521] [4.5/4.6 Regression] [C++0x] std::result_of doesn't work with pointer to member
2011-04-08 21:16 [Bug libstdc++/48521] New: [4.5/4.6/4.7 Regression] [C++0x] std::result_of doesn't work with pointer to member redi at gcc dot gnu.org
` (7 preceding siblings ...)
2011-04-19 13:28 ` [Bug libstdc++/48521] [4.5/4.6 " redi at gcc dot gnu.org
@ 2011-04-23 17:51 ` redi at gcc dot gnu.org
2011-04-23 17:55 ` [Bug libstdc++/48521] [4.5 " redi at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2011-04-23 17:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48521
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-04-23 17:51:34 UTC ---
Author: redi
Date: Sat Apr 23 17:51:31 2011
New Revision: 172901
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172901
Log:
2011-04-23 Jonathan Wakely <jwakely.gcc@gmail.com>
PR libstdc++/48521
* include/std/type_traits (result_of): Handle pointer to member.
* include/std/functional (__invoke): Likewise.
(_Function_to_function_pointer): Remove.
(_Reference_wrapper_base): Provide nested types independent of
unary_function and binary_function.
(reference_wrapper::operator()): DR 2017.
(ref(const A&&), cref(const A&&): Define as deleted.
* include/std/future (async): Simplify SFINAE and use result_of to
support pointer to member.
* testsuite/20_util/reference_wrapper/invoke.cc: Test pointer to
member.
* testsuite/20_util/reference_wrapper/24803.cc: Likewise.
* testsuite/20_util/reference_wrapper/typedefs.cc: Test for types
instead of derivation from unary_function and binary_function.
* testsuite/20_util/reference_wrapper/invoke-2.cc: New.
* testsuite/20_util/reference_wrapper/ref_neg.c: New.
* testsuite/20_util/reference_wrapper/typedefs-3.c: New.
Added:
branches/gcc-4_6-branch/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke-2.cc
branches/gcc-4_6-branch/libstdc++-v3/testsuite/20_util/reference_wrapper/ref_neg.cc
branches/gcc-4_6-branch/libstdc++-v3/testsuite/20_util/reference_wrapper/typedefs-3.cc
Modified:
branches/gcc-4_6-branch/libstdc++-v3/ChangeLog
branches/gcc-4_6-branch/libstdc++-v3/include/std/functional
branches/gcc-4_6-branch/libstdc++-v3/include/std/future
branches/gcc-4_6-branch/libstdc++-v3/include/std/type_traits
branches/gcc-4_6-branch/libstdc++-v3/testsuite/20_util/reference_wrapper/24803.cc
branches/gcc-4_6-branch/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc
branches/gcc-4_6-branch/libstdc++-v3/testsuite/20_util/reference_wrapper/typedefs.cc
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/48521] [4.5 Regression] [C++0x] std::result_of doesn't work with pointer to member
2011-04-08 21:16 [Bug libstdc++/48521] New: [4.5/4.6/4.7 Regression] [C++0x] std::result_of doesn't work with pointer to member redi at gcc dot gnu.org
` (8 preceding siblings ...)
2011-04-23 17:51 ` redi at gcc dot gnu.org
@ 2011-04-23 17:55 ` redi at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2011-04-23 17:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48521
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to work| |4.6.1
Resolution| |FIXED
Summary|[4.5/4.6 Regression] |[4.5 Regression] [C++0x]
|[C++0x] std::result_of |std::result_of doesn't work
|doesn't work with pointer |with pointer to member
|to member |
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-04-23 17:54:45 UTC ---
fixed for 4.6.1
I don't plan to fix this on the 4.5 branch
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-04-23 17:55 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-08 21:16 [Bug libstdc++/48521] New: [4.5/4.6/4.7 Regression] [C++0x] std::result_of doesn't work with pointer to member redi at gcc dot gnu.org
2011-04-08 21:16 ` [Bug libstdc++/48521] " redi at gcc dot gnu.org
2011-04-09 10:55 ` redi at gcc dot gnu.org
2011-04-16 19:53 ` redi at gcc dot gnu.org
2011-04-16 23:12 ` paolo.carlini at oracle dot com
2011-04-17 20:28 ` redi at gcc dot gnu.org
2011-04-18 21:44 ` redi at gcc dot gnu.org
2011-04-19 13:26 ` redi at gcc dot gnu.org
2011-04-19 13:28 ` [Bug libstdc++/48521] [4.5/4.6 " redi at gcc dot gnu.org
2011-04-23 17:51 ` redi at gcc dot gnu.org
2011-04-23 17:55 ` [Bug libstdc++/48521] [4.5 " 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).