From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27122 invoked by alias); 26 Jun 2014 12:44:09 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 27100 invoked by uid 89); 26 Jun 2014 12:44:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 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; Thu, 26 Jun 2014 12:44:07 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5QCi6fL015086 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 26 Jun 2014 08:44:06 -0400 Received: from localhost (vpn1-4-174.ams2.redhat.com [10.36.4.174]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5QCi5TT006250; Thu, 26 Jun 2014 08:44:06 -0400 Date: Thu, 26 Jun 2014 12:44:00 -0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [patch] Simplify allocator use Message-ID: <20140626124405.GI2711@redhat.com> References: <20140625205624.GD2711@redhat.com> <20140625230602.GF2711@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="f61P+fpdnY2FZS1u" Content-Disposition: inline In-Reply-To: <20140625230602.GF2711@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2014-06/txt/msg02126.txt.bz2 --f61P+fpdnY2FZS1u Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-length: 808 On 26/06/14 00:06 +0100, Jonathan Wakely wrote: >This simplifies some of the test changes in my last patch, I was >misusing the CustomPointerAlloc due to confusion with some uncommitted >changes. And this fixes the -fno-rtti version of make_shared, I shouldn't have changed the deleter's parameter to the allocator's pointer. That worked with the current test, but only because our CustomPointerAlloc uses a custom pointer that is implicitly-convertible from value_type*. I have a completely rewritten custom pointer for the testsuite which doesn't support implicit conversions (only the minimum requirements) and that caught this bug. The new custom pointer type is proving very useful while I'm making some std::list changes but isn't ready for prime-time yet. Tested x86_64-linux, committed to trunk. --f61P+fpdnY2FZS1u Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="patch.txt" Content-length: 815 commit e69d8134edde691db7ea2567032229b210dd263d Author: Jonathan Wakely Date: Thu Jun 26 13:27:30 2014 +0100 * include/bits/shared_ptr_base.h (__shared_ptr::_Deleter): Fix parameter type. diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h index 590a8d3..6f85ffa 100644 --- a/libstdc++-v3/include/bits/shared_ptr_base.h +++ b/libstdc++-v3/include/bits/shared_ptr_base.h @@ -1085,7 +1085,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct _Deleter { - void operator()(typename _Alloc::pointer __ptr) + void operator()(_Tp* __ptr) { __allocated_ptr<_Alloc> __guard{ _M_alloc, __ptr }; allocator_traits<_Alloc>::destroy(_M_alloc, __guard.get()); --f61P+fpdnY2FZS1u--