[Bug c++/52924] [4.7 Regression] Using an std::function object as deleter of shared_ptr in C++0x mode does not compile

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Apr 10 12:56:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52924

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-04-10 12:55:40 UTC ---
another testcase showing a similar bug:

#include <memory>

template<typename T>
struct Alloc : std::allocator<T>
{
    template<typename U> struct rebind { typedef Alloc<U> other; };

    template<typename U> Alloc(const Alloc<U>&) { }

    Alloc() = default;
    ~Alloc() noexcept(false) { }
};

Alloc<A> alloc;

auto x = std::allocate_shared<A>(alloc);



More information about the Gcc-bugs mailing list