public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/44381] New: [C++0x]: result_of broken for functor references.
@ 2010-06-02 14:56 avenikov at gmail dot com
2010-06-02 15:19 ` [Bug c++/44381] " rguenth at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: avenikov at gmail dot com @ 2010-06-02 14:56 UTC (permalink / raw)
To: gcc-bugs
The FCD (n3092) states in 20.7.6.6 (Table # 53), that result_of should work
with references to functors as well. Current implementation of result_of will
only work with functor types, not with references to functor types.
The following will produce incorrect results:
#include <functional>
struct F
{
typedef int result_type;
int operator() ();
};
std::result_of<F&()>::type N1; //Will fail but shouldn't
std::result_of<F()>::type N2; //Works as expected
Build with the following compile arguments (where test.cpp is the code above):
g++ --std=c++0x -g -O2 -Wall -Wno-long-long --pedantic test.cpp
Andy.
--
Summary: [C++0x]: result_of broken for functor references.
Product: gcc
Version: 4.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: avenikov at gmail dot com
GCC host triplet: x86-64, Linux 2.6.18 (Suse 11.0), gcc 4.3.3
GCC target triplet: x86-64, Linux 2.6.18 (Suse 11.0), gcc 4.3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44381
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/44381] [C++0x]: result_of broken for functor references.
2010-06-02 14:56 [Bug c++/44381] New: [C++0x]: result_of broken for functor references avenikov at gmail dot com
@ 2010-06-02 15:19 ` rguenth at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-02 15:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2010-06-02 15:19 -------
*** This bug has been marked as a duplicate of 44380 ***
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44381
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-02 15:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-02 14:56 [Bug c++/44381] New: [C++0x]: result_of broken for functor references avenikov at gmail dot com
2010-06-02 15:19 ` [Bug c++/44381] " rguenth at gcc dot gnu dot 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).