From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79977 invoked by alias); 10 Apr 2015 14:42:24 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 79937 invoked by uid 48); 10 Apr 2015 14:42:20 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/55409] std::list not properly wrapping access to custom allocator through allocator_traits Date: Fri, 10 Apr 2015 14:42:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.7.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: 6.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-04/txt/msg00859.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55409 --- Comment #10 from Jonathan Wakely --- Minimal test: #include template class my_alloc { public: typedef T value_type; T* allocate(size_t n) { return std::allocator::allocate(n); } void deallocate(T* ptr, size_t n) { std::allocator::deallocate(ptr, n); } my_alloc() = default; template my_alloc(const my_alloc&) noexcept {} }; template bool operator==(const my_alloc&, const my_alloc&) { return true; } template bool operator!=(const my_alloc&, const my_alloc&) { return false; } int main() { typedef std::list> container_type; container_type cont; cont.push_back(11); }