From patchwork Tue Dec 22 11:38:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 559983 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id C9FCB140BB9 for ; Tue, 22 Dec 2015 22:38:32 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=uYBZkCOn; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; q=dns; s=default; b=d/0j+AUYj7xuYkxU5bqC/zPNTtw+mJ Ulez/3xhccOiMmWjHNwgGT1A5o4LdMUaJkpbtQSIUFVVc5abZrrDG2GIav/P0s3d dS8B4zxlWMDwFj9wq5g//+pmwp/cgNp0jTdrttgJb3A6fVg23mtIpjEp2t5eCkvY WgACKt9TH/jS8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; s=default; bh=tk5joJ/ZCGp/ST7FGpwJ1riTrAE=; b=uYBZ kCOngUU+lMJU7ecTXIp5/doz2Pot6kTTQVQLz95rTX/mI9GGcJSIFWdwZrfk+ria cNC00eEoNgxo/3v+fZFIVDYZbacM1GiTAzNf4XfX2dl9X5vivcF9NHWEj6iGHor5 3sOPe/OJSlqlpymlx2q59UleCgBxMg7zVquh1hs= Received: (qmail 17524 invoked by alias); 22 Dec 2015 11:38:16 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 17421 invoked by uid 89); 22 Dec 2015 11:38:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1523 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 22 Dec 2015 11:38:12 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id C7A48E7087; Tue, 22 Dec 2015 11:38:10 +0000 (UTC) Received: from localhost (ovpn-116-121.ams2.redhat.com [10.36.116.121]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tBMBc9T7026422; Tue, 22 Dec 2015 06:38:10 -0500 Date: Tue, 22 Dec 2015 11:38:09 +0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [patch] libstdc++/59768 Fix std::invoke support for reference_wrappers Message-ID: <20151222113809.GG5356@redhat.com> References: <20151211214338.GI5356@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20151211214338.GI5356@redhat.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.5.24 (2015-08-30) On 11/12/15 21:43 +0000, Jonathan Wakely wrote: > Fix std::invoke support for reference_wrappers > > PR libstdc++/59768 > * include/std/functional (_Unwrap, __invfwd): Define. > (__invoke_impl): Remove reference_wrapper overloads and use __invfwd. > * include/std/type_traits (__result_of_memobj, __result_of_memfun): > Add partial specializations for const reference_wrappers and simplify. > * testsuite/20_util/bind/ref_neg.cc: Use dg-excess-errors. > * testsuite/20_util/function_objects/invoke/59768.cc: New. This change was missing an inline specifier on the new __invfwd function template. Tested ppc64le-linux, committed to trunk. commit a8177a9b95226cc5499d32ecee2034640d881f96 Author: Jonathan Wakely Date: Tue Dec 22 11:20:09 2015 +0000 Add inline to std::__invfwd PR libstdc++/59768 * include/std/functional (__invfwd): Add inline specifier. diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional index b994df4..9b853e8 100644 --- a/libstdc++-v3/include/std/functional +++ b/libstdc++-v3/include/std/functional @@ -207,7 +207,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Used by __invoke_impl instead of std::forward<_Tp> so that a // reference_wrapper is converted to an lvalue-reference. template - typename _Unwrap<_Tp>::type + inline typename _Unwrap<_Tp>::type __invfwd(typename remove_reference<_Tp>::type& __t) noexcept { return _Unwrap<_Tp>::_S_fwd(__t); }