From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by sourceware.org (Postfix) with ESMTPS id D9BA3385800F for ; Mon, 28 Dec 2020 20:34:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D9BA3385800F Received: by mail-wm1-x335.google.com with SMTP id n16so404617wmc.0 for ; Mon, 28 Dec 2020 12:34:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/0+gB3Kif73qzToBFbafVwsSSSNb0UK3crP3btJOz6A=; b=ZIQdXzNg6ojjx8sxD0RaOtMcGP8iiwdDlXgcT1Ag+x9pULoiM57BAt78f3k2RWeO9T xFU2C+YRJumdQhKhdXjbdCRtXHI2k2FdWi/fd4Hl9hcXr/bJmYc79/MO56tG1nhjywd2 YvEjiUpgYiqhSjZrBfc5GEqnFb0T4aewWZ4whTB+3pKTDsCQRQEfLcgS78b/CKBVhsrJ 84w9pdOuJ7w4ijXloHzn/BEEOEY/yNb6xIipN/kmExKFMLYMtKvU3V09fVHvK+czYUmg w+HzHff+CcBwmuVzP9Q+LqWyBhlAJpgJ8+zQ6PMRrzVKyTxleVMN5zaRSCYGN1VzoL05 BQJg== X-Gm-Message-State: AOAM530KoovoV5CDP6AC1fkTmOAbWN0EaFZr4ylNKyyANWAmwDdu8pYw /FrN0xsbphaxMRAIk5HjfFR+jCPJjls2S1SnjDw= X-Google-Smtp-Source: ABdhPJyutNwT0RcbvNbgFfCPwnKJrUcGSNZlyYWewEleNuMQjPY7y04WKPi1EPgjSOPj8p8/ytx5RR/pPvTgDaz7HUE= X-Received: by 2002:a1c:7213:: with SMTP id n19mr556049wmc.14.1609187640296; Mon, 28 Dec 2020 12:34:00 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Mon, 28 Dec 2020 20:33:49 +0000 Message-ID: Subject: Re: Should reinterpret_cast be constexpr? To: Josh Marshall Cc: "libstdc++" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.8 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.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Mon, 28 Dec 2020 20:34:03 -0000 On Mon, 28 Dec 2020 at 19:51, Josh Marshall via Libstdc++ wrote: > > Hello all, > > From the test error `libstdc++-v3/include/bits/stl_vector.h:1837: error: > 'reinterpret_cast' is not a constant expression` and the documentation at > https://en.cppreference.com/w/cpp/language/reinterpret_cast , is > `reinterpret_cast()` not constexpr in error? No, it's not an error. reinterpret_cast is not allowed in constant expressions.