From nobody Wed Jan 08 18:10:54 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 4YSwvw61bSz5ktCr for ; Wed, 08 Jan 2025 18:11:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YSwvw498fz4Brs for ; Wed, 8 Jan 2025 18:11:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-2ef6c56032eso113489a91.2 for ; Wed, 08 Jan 2025 10:11:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1736359867; x=1736964667; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=iUfopAnwkaANNuhx7uYQF1gcrCKBi3QW/42y5VMbBPo=; b=X+mfUteHRnCO1kQydeFADGUNUCP0/ewHt0Dx7AaTAuuQ/8SqmnvnxvHQZoQEG5lbgo j+VkwRCF+Y0/w8CzWGaApPTiiuNUngoovn2DF1SdH+JKPRRIXgoTaknNRfgd6oX7OrKu fp+kRzFlpUEyy86/hbyN7sD4cls0lted1/51+/IxLo0XBlXI1dLwJUf1vhtPFejAak5y eElrwp5nC9M0LUkkFb18Vs6SMPjRbcsWDWoq5NGssQISUwVsM8dzfIzELdVGjziCQQol DAALgEy1kMPjiVbfhMlNK6z+NYfu5j/gXEiw8qtgfEj+c3b7hYARGZ/WH+7hYKRQ7uca VbBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736359867; x=1736964667; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iUfopAnwkaANNuhx7uYQF1gcrCKBi3QW/42y5VMbBPo=; b=ANt2LMI8ua1YOtbxMA85NbbMKf55SPwefgEpzSyOS8QcNrbWLHy8rbsxaM3tqy1JlU Z+35eIZ6kLmjJ+JbjDQBenNMMhZkql/rP6qecY1mdK0QntuL3vWERWsHK2D7gXTVLrXb yz6H6hMTw3EdhKRr3PIPEHBkLbbXsHl37SWUY4MV4LXmGzJ8dMXgPS0GG0E8s2rfe2JO vuiFG/6e5DngAHShM1SGGTlmqw7GNjGrtwJTMdhKiEdG8R6LN4G1/WogRqFV0rMp0slw vg73rmTie5zdvEJZOG3ULWWOUKdBVIXDZugs2OS0pQD9Gg5pbhDOmVWmKFiHaraa2uiv COTA== X-Forwarded-Encrypted: i=1; AJvYcCWzvhL0HkiZR/HUvtRnBdmIHto+THzVTiptindU0vRDFnyvNCjk3AL3tIdgRbdNCePdjMbmiCZR7JA1gqv6eAE=@freebsd.org X-Gm-Message-State: AOJu0YxJkXa1UQ32UcovDkoDpKuxuO5MrVj0UxXnaWmtTiUVCx+zm+yu i/FJaBFJO1BX8sF6o2ac9lZUPpyoGiO4tprCCOo27bpGghBHGL9Xaejfr8T/sfRSyUOs2YlxGjk Lmx7Adutpj6MnzS02B6Be+0P/8Junf7fTP7d/uApbVARSfffDoss= X-Gm-Gg: ASbGncvrO3P9DMZM0bu9MyooYkOPVIrrTLlKnxS+t+OuLr8m7XgP5MlGLuHxK2JkK/9 8HJJZ0mJaLzfZSv5tKkx86qfgtUQu+beYSU2IrYyAGEGNSGaBrejxPu8at8ExIvG8qc4/ X-Google-Smtp-Source: AGHT+IF7ZTHLS5ScZgQG+30/BqVB2zDH8ibIf/He/cVk0KD3oToLVlUD/y9HYBremGuc1YH4sABpMjAHRttqRiHs/Fk= X-Received: by 2002:a17:90b:538e:b0:2ee:3cc1:793a with SMTP id 98e67ed59e1d1-2f548f580femr5668442a91.29.1736359866551; Wed, 08 Jan 2025 10:11:06 -0800 (PST) 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 References: <4F5BB7D7-94F6-46D2-B467-4E51991311BE@FreeBSD.org> In-Reply-To: From: Warner Losh Date: Wed, 8 Jan 2025 11:10:54 -0700 X-Gm-Features: AbW1kva9xv2-WbM9wWmdMBaFp_AQWsB-j4O7D5-o8RnQdY7sjpDY3gcltH_1IJg Message-ID: Subject: Re: What's the newest C++ standard that we can target? To: Alan Somers Cc: Dimitry Andric , FreeBSD CURRENT Content-Type: multipart/alternative; boundary="0000000000000c6995062b35c94a" X-Rspamd-Queue-Id: 4YSwvw498fz4Brs X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] --0000000000000c6995062b35c94a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 8, 2025, 10:47=E2=80=AFAM Alan Somers wro= te: > On Wed, Jan 8, 2025 at 10:44=E2=80=AFAM Dimitry Andric = wrote: > > > > On 8 Jan 2025, at 18:31, Alan Somers wrote: > > > > > > 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? > > > > C++17 is probably the safest one, as C++20 support in libc++ 19 is > > mostly done, but not entirely complete: > > > > https://libcxx.llvm.org/Status/Cxx20.html > > > > 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. > > > > 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? > > > > -Dimitry > > I guess I should've mentioned that I would like to MFC to stable/14, > too. I certainly intend to avoid exotic parts. Is there any better > way to ensure that may code will build other than "make universe"? > No. But I keep a stable/13 and stable/14 trees around that I build on amd64 and armv7 for all changes unless I'm worried. It's faster. Another way is to have jails for these environments for incremental development or quick experiments. Poudriere is a good way to build those jails quickly. Warner --0000000000000c6995062b35c94a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Jan 8, 2025, 10:47=E2=80=AFAM Alan Somers <= asomers@freebsd.org> wrote:
On Wed, Jan 8, 2025 at 10:44=E2=80=AFAM Dimitry Andric <dim@fre= ebsd.org> wrote:
>
> On 8 Jan 2025, at 18:31, Alan Somers <asomers@freebsd.o= rg> wrote:
> >
> > What is the newest C++ standard that we can target in src, and be=
> > confident that it will compile on all targets?=C2=A0 Can we use C= ++20?
>
> C++17 is probably the safest one, as C++20 support in libc++ 19 is
> mostly done, but not entirely complete:
>
> https://libcxx.llvm.org/Status/C= xx20.html
>
> 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 stil= l
> gated under -fexperimental-library, at least until libc++ 20 comes out= .
>
> That said, older existing releases don't have libc++ 19 yet, and t= hey
> are missing a few headers too. So it depends on whether you want to > target -CURRENT only?
>
> -Dimitry

I guess I should've mentioned that I would like to MFC to stable/14, too.=C2=A0 I certainly intend to avoid exotic parts.=C2=A0 Is there any bet= ter
way to ensure that may code will build other than "make universe"= ?

No.

But I keep a stable= /13 and stable/14 trees around that I build on amd64 and armv7 for all chan= ges unless I'm worried. It's faster. Another way is to have jails f= or these environments for incremental development or quick experiments. Pou= driere is a good way to build those jails quickly.
<= br>
Warner=C2=A0
--0000000000000c6995062b35c94a--