From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24794 invoked by alias); 2 Jun 2010 14:56:50 -0000 Received: (qmail 24711 invoked by uid 48); 2 Jun 2010 14:56:33 -0000 Date: Wed, 02 Jun 2010 14:56:00 -0000 Subject: [Bug c++/44381] New: [C++0x]: result_of broken for functor references. X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "avenikov at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-06/txt/msg00158.txt.bz2 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 struct F { typedef int result_type; int operator() (); }; std::result_of::type N1; //Will fail but shouldn't std::result_of::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