Date: Wed, 8 Jan 2025 18:44:43 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: Alan Somers <asomers@freebsd.org> Cc: FreeBSD CURRENT <freebsd-current@freebsd.org> Subject: Re: What's the newest C++ standard that we can target? Message-ID: <4F5BB7D7-94F6-46D2-B467-4E51991311BE@FreeBSD.org> In-Reply-To: <CAOtMX2hCM3BEK%2B4ydw8g2R7b=T_TR6U4YRXpDbFijD52y=jA8g@mail.gmail.com> References: <CAOtMX2hCM3BEK%2B4ydw8g2R7b=T_TR6U4YRXpDbFijD52y=jA8g@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
On 8 Jan 2025, at 18:31, Alan Somers <asomers@freebsd.org> 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? -Dimitryhelp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F5BB7D7-94F6-46D2-B467-4E51991311BE>
