From patchwork Sun Jul 31 20:37:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 107646 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]) by ozlabs.org (Postfix) with SMTP id E117DB6F8B for ; Mon, 1 Aug 2011 06:37:56 +1000 (EST) Received: (qmail 32069 invoked by alias); 31 Jul 2011 20:37:51 -0000 Received: (qmail 32052 invoked by uid 22791); 31 Jul 2011 20:37:51 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from acsinet15.oracle.com (HELO acsinet15.oracle.com) (141.146.126.227) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 31 Jul 2011 20:37:35 +0000 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by acsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p6VKbWOo025834 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 31 Jul 2011 20:37:34 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p6VKbW1Q023914 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 31 Jul 2011 20:37:32 GMT Received: from abhmt101.oracle.com (abhmt101.oracle.com [141.146.116.53]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p6VKbRuR008275; Sun, 31 Jul 2011 15:37:27 -0500 Received: from [192.168.1.4] (/79.53.21.128) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 31 Jul 2011 13:37:27 -0700 Message-ID: <4E35BD04.6090304@oracle.com> Date: Sun, 31 Jul 2011 22:37:24 +0200 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: libstdc++ Subject: [v3] libstdc++/49925 X-IsSubscribed: yes 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 Hi, tested x86_64-linux, committed mainline and 4_6-branch. Paolo. //////////////////////// 2011-07-31 Paolo Carlini PR libstdc++/49925 * include/bits/shared_ptr.h (make_shared): Qualify allocate_shared with std::. * include/bits/shared_ptr_base.h (__make_shared): Likewise. Index: include/bits/shared_ptr.h =================================================================== --- include/bits/shared_ptr.h (revision 176961) +++ include/bits/shared_ptr.h (working copy) @@ -607,8 +607,8 @@ make_shared(_Args&&... __args) { typedef typename std::remove_const<_Tp>::type _Tp_nc; - return allocate_shared<_Tp>(std::allocator<_Tp_nc>(), - std::forward<_Args>(__args)...); + return std::allocate_shared<_Tp>(std::allocator<_Tp_nc>(), + std::forward<_Args>(__args)...); } /// std::hash specialization for shared_ptr. Index: include/bits/shared_ptr_base.h =================================================================== --- include/bits/shared_ptr_base.h (revision 176961) +++ include/bits/shared_ptr_base.h (working copy) @@ -1432,14 +1432,14 @@ __make_shared(_Args&&... __args) { typedef typename std::remove_const<_Tp>::type _Tp_nc; - return __allocate_shared<_Tp, _Lp>(std::allocator<_Tp_nc>(), - std::forward<_Args>(__args)...); + return std::__allocate_shared<_Tp, _Lp>(std::allocator<_Tp_nc>(), + std::forward<_Args>(__args)...); } /// std::hash specialization for __shared_ptr. template struct hash<__shared_ptr<_Tp, _Lp>> - : public std::unary_function<__shared_ptr<_Tp, _Lp>, size_t> + : public __hash_base> { size_t operator()(const __shared_ptr<_Tp, _Lp>& __s) const