From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 809833858C50; Tue, 28 Mar 2023 16:21:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 809833858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680020461; bh=lzV1U7TS9H0vM2hE6fhbMt7JjOvm7x/KPv7Udf4jgD8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZlujFQ85MWcVR5HmsN8WQR6rmpe+Fd9+A+Ro9SlhQh0GisJVo3PFvK5ftHq3I93tr YQ0l8Z4QIFTDNyP8ywzfjNcfYa4+kha5axCzRZhoCM0gvd/qcE7i/kXfmR9h9PEvRk LhKfdFVLMjqXePOjK0Zwcxc9KI5ni89o46TTiS0A= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/109305] Allocator copy in basic_string::operator= Date: Tue, 28 Mar 2023 16:21: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: 12.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109305 --- Comment #6 from Jonathan Wakely --- For your reproducer, the allocator is std::allocator which is an empty class and copying is a no-op. There is no efficiency concern whatsoever.=