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.
commit e69d8134edde691db7ea2567032229b210dd263d Author: Jonathan Wakely <jwak...@redhat.com> 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<typename _Alloc> 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());