public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "avenikov at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/44381] New: [C++0x]: result_of broken for functor references. Date: Wed, 02 Jun 2010 14:56:00 -0000 [thread overview] Message-ID: <bug-44381-19272@http.gcc.gnu.org/bugzilla/> (raw) 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
next reply other threads:[~2010-06-02 14:56 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-06-02 14:56 avenikov at gmail dot com [this message] 2010-06-02 15:19 ` [Bug c++/44381] " rguenth at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-44381-19272@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).