From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12016 invoked by alias); 22 May 2011 22:51:41 -0000 Received: (qmail 12005 invoked by uid 22791); 22 May 2011 22:51:40 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 22 May 2011 22:51:25 +0000 From: "paolo.carlini at oracle dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/49058] [C++0x] Bind no-arguments functor failed using std::bind with -pedantic option. X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: paolo.carlini at oracle dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sun, 22 May 2011 23:17:00 -0000 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: 2011-05/txt/msg02012.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058 --- Comment #15 from Paolo Carlini 2011-05-22 22:30:55 UTC --- This is something which actually passes the testsuite, and the tests here and the new test explained by Jon. Maybe something even more clean along the same lines is possible, but I would be already pretty happy for now... assuming Jon isn't able to figure out yet another regression ;) //////////////////// Index: include/std/functional =================================================================== --- include/std/functional (revision 174044) +++ include/std/functional (working copy) @@ -1210,7 +1210,8 @@ // Call as const template()( + = decltype( std::declval= 0), + typename add_const<_Functor>::type, void>::type>()( _Mu<_Bound_args>()( std::declval(), std::declval&>() )... ) )> _Result @@ -1223,7 +1224,8 @@ // Call as volatile template()( + = decltype( std::declval= 0), + typename add_volatile<_Functor>::type, void>::type>()( _Mu<_Bound_args>()( std::declval(), std::declval&>() )... ) )> _Result @@ -1236,7 +1238,8 @@ // Call as const volatile template()( + = decltype( std::declval= 0), + typename add_cv<_Functor>::type, void>::type>()( _Mu<_Bound_args>()( std::declval(), std::declval&>() )... ) )> _Result