From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6296 invoked by alias); 30 Jan 2015 10:43:10 -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 6220 invoked by uid 48); 30 Jan 2015 10:43:04 -0000 From: "rs2740 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/64865] std::allocator::construct/destroy not called for specialization of std::allocator Date: Fri, 30 Jan 2015 10:43: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: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: rs2740 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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-01/txt/msg03499.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64865 TC changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rs2740 at gmail dot com --- Comment #2 from TC --- (In reply to Casey Carter from comment #0) > * Close this bug report as WONTFIX since it is horrible design to specialize > std::allocator instead of declaring a new allocator type; given that > container implementations are free to rebind to a different specialization, > there is no guarantee that functionality added to a user-defined > specialization will even be used. Since the allocator_type member must be the Alloc template argument provided by the user and not any rebound types, though, it seems to me that it is in fact guaranteed that their versions of construct() and destroy() will be called, as the paragraph you cite requires the use of allocator_traits::construct and allocator_traits::destroy.