From nobody Wed Jan 08 19:25:49 2025 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YSyZ74Jv1z5jmmB for ; Wed, 08 Jan 2025 19:25:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YSyZ73hr9z4LsF; Wed, 8 Jan 2025 19:25:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736364351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rDiCjQhdwsePAXwjGDiwOZ6dS0YGuFOxvny1NQ4h4p4=; b=Ca7/S66PGYZ5sJut7Xcs+kzGO6m+l4fR94KpNHwD3TV52mwxWxLFhxUkXcvsHfIFJvA0/Z U1RurQlxjXy5+6wkOULWnWG6RpnGrHgC/6Ru0xy0KQfbv8YhC6fZbeIwVjEWsu7J4kjZJ1 0MzHEMOzNWa8c1sIhvgydtG08ArBpvK0lau7BgFa5gNyvTsU2Pe5dFUSISjBEMg1ahOIUq T/WL1Zv8SpJkOg2iW9ofDVqMt3WDeJcFjTMvnxo+3NLEUTa7hRNZJS+xuWie9TSVPyO3+u b2PYrNQ/JmobnMmvxygIAmJnAXdfvvrMHQmM0tY4BckcdkuYG/vhRK+cN9DxhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736364351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rDiCjQhdwsePAXwjGDiwOZ6dS0YGuFOxvny1NQ4h4p4=; b=Qve4SgyrTF4IpJ4yom5jtqcfBdJspMcoOwmYWhV9tXJnlQrQw6dfQrvVl6tjtXzPHll3Zi WdYHJmhqt2mBi+DRXpQbm+V6AvoFk1txuOv1AV8Du03z4QRlF3MLiUU/hJtiNT/ShI6Y8k uNS5Y8zKQB0ee6AyVa83Y7H8G61dJivgIgO+rVEpEseYeaqa48nOX0Qv4/7tYYUBLV2iZ6 i0nxTHEskDFyhxWWskH041I+NkII9jh582Z3dpC2X4m4e2qlMNAMR4bLVhNikhR48mA+Cp j2Oo/105SyRUzFMMz171xijg0ploSwmCJbI28mGCd/14WnJmLsvBPqHGzip+ng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736364351; a=rsa-sha256; cv=none; b=FmCOUymVDZRAhg3xo8FKObMDZdFfDXG/reHnUYwDdIayf1rVqvcGeqroIxM/nRI0qK2kKQ Z3Blq4W8AAd77dWpRpTROexkqFRwIYbCIJ2NfQxrR3MGYRwsg654zaNvVTKy9b1Sg9kMr9 lzasR5COrI5Ow70QwjtJOC8ye8pWtcg+LSVIv9PhVcDnJm0x1oXA34yFQA+oStdMsfBae8 BZ1p+fq5J3zjnifS0oju+5V0lGs1VQZMxH8UumknZfP1MeQKzV9sFXbcDnAme7eWLIQqc1 8k9yTeBwpCc7l2yTZnP3yj68pSk2ENr9qrUyovu8VLjLBTg5e8alUd9jPTScaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "R10" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4YSyZ72MxzztBF; Wed, 08 Jan 2025 19:25:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.home.andric.com [192.168.0.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 00F70652F2; Wed, 08 Jan 2025 20:25:49 +0100 (CET) Content-Type: text/plain; charset=utf-8 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.9\)) Subject: Re: What's the newest C++ standard that we can target? From: Dimitry Andric In-Reply-To: Date: Wed, 8 Jan 2025 20:25:49 +0100 Cc: FreeBSD CURRENT Content-Transfer-Encoding: quoted-printable Message-Id: <3D83CD42-6FA5-4A43-B057-B293FB0B3D1C@FreeBSD.org> References: <4F5BB7D7-94F6-46D2-B467-4E51991311BE@FreeBSD.org> To: Alan Somers X-Mailer: Apple Mail (2.3731.700.6.1.9) On 8 Jan 2025, at 18:46, Alan Somers wrote: >=20 > On Wed, Jan 8, 2025 at 10:44=E2=80=AFAM Dimitry Andric = wrote: >>=20 >> On 8 Jan 2025, at 18:31, Alan Somers wrote: >>>=20 >>> What is the newest C++ standard that we can target in src, and be >>> confident that it will compile on all targets? Can we use C++20? >>=20 >> C++17 is probably the safest one, as C++20 support in libc++ 19 is >> mostly done, but not entirely complete: >>=20 >> https://libcxx.llvm.org/Status/Cxx20.html >>=20 >> As long as you avoid modules, and the more exotic parts, you should = be >> fine. One glaring remaining issue is that std::jthread support is = still >> gated under -fexperimental-library, at least until libc++ 20 comes = out. >>=20 >> That said, older existing releases don't have libc++ 19 yet, and they >> are missing a few headers too. So it depends on whether you want to >> target -CURRENT only? >>=20 >> -Dimitry >=20 > I guess I should've mentioned that I would like to MFC to stable/14, > too. llvm-19 was already merged to stable/14 and stable/13, so that should be no problem. > I certainly intend to avoid exotic parts. Is there any better > way to ensure that may code will build other than "make universe"? If you are on a recent -CURRENT system, you should be able to build the program standalone. If you add it to the base system, you should only have to do special handling if you want to make it part of the bootstrap tools or cross-tools phase. -Dimitry