From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id 91A293858435 for ; Sat, 28 Aug 2021 10:48:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 91A293858435 Received: by mail-wr1-x42f.google.com with SMTP id h13so14458317wrp.1 for ; Sat, 28 Aug 2021 03:48:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=NJIlcmPOn8WTXdVSrup8eJKzsyGH8yFOnogMMtuvXe0=; b=Ubvas8KTHkGLUP54QjT/onZ8hVPWCiaeVpABKzlP/q85v6z6JUvPlZ6oXJof8GbOav Mnn+E8pG+WxRDxO3PW2C9A1Z34dE12wXpZPNoe0DhceGgBAKATGDyMSotvsQogmRcaOU jTqxi9u8AbmjGMY8+Ug6vFGmQ6Q31dWNNSOnLDXnmdv06EI1JiJHk6f/qfmgr81yud52 NN8XsxPxehVHhRtW6QFvn9qZiI8CJl8ql0emhO5rMZtETrrnpecC8pM2BmO0tsFkB2Tb 72plChW72P2Rv4dRosZPshNjHz/2AeO7ah2Gn0k6I2FpUGaKgH4jk7mde62JOnCJYfp9 VkdQ== X-Gm-Message-State: AOAM533XJ7Mfv5Gq3eG/qHySceGLGyEyhyb7qTmLTbCRFVN1X2OZwy3x HI2yZt0mJbFXv/XZzQye+fIWmvRQD7AXfWkBvefFuUoS X-Google-Smtp-Source: ABdhPJxWKgEH4gi9K2bQlYsHO2/rPZ+d+nCRugcou8rNcFcjr1ZFWIMAj2rOO8KssxYolU7l6ZhX//oTIOlctnslf90= X-Received: by 2002:adf:b785:: with SMTP id s5mr14803292wre.30.1630147723431; Sat, 28 Aug 2021 03:48:43 -0700 (PDT) MIME-Version: 1.0 From: Jonathan Wakely Date: Sat, 28 Aug 2021 11:48:32 +0100 Message-ID: Subject: RFC: Drop C++98 support for versioned namespace (i.e. unstable ABI mode) To: "libstdc++" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2021 10:48:46 -0000 Not something I plan to work on in the near future, but an idea worth sharing. Before anybody panics, this does not affect the default configuration. C++98 will still be supported. I'm only talking about the unstable ABI build mode chosen when installing GCC, by --enable-symvers=gnu-versioned-namespace. If you don't know what that is, this RFC isn't something you need to worry about. Currently there are some places where we can't define constructors, assignment operators and destructors as defaulted, because it would create an ABI incompatibility between C++98 (which can't use defaulted members) and later standards. That means that even for the unstable ABI (versioned namespace) configuration, we are constrained by backwards compatibility (but compat with older standards, not older GCC releases). If we dropped C++98 support for the versioned namespace, it would open up additional opportunities for improvements to the versioned namespace mode. As a specific example, std::allocator currently has a user-provided, non-trivial default constructor. We can't define it as =default because that doesn't work in C++98, and would make it trivial in C++11, but still user-provided (and non-trivial) in C++98. We can't make that change for the ABI stable mode anyway, because it would be incompatible with older GCC releases. But we could do it for the versioned namespace if we stopped supporting C++98.