Re: What's the newest C++ standard that we can target?
- Reply: Warner Losh : "Re: What's the newest C++ standard that we can target?"
- Reply: Dimitry Andric : "Re: What's the newest C++ standard that we can target?"
- In reply to: Dimitry Andric : "Re: What's the newest C++ standard that we can target?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 08 Jan 2025 17:46:53 UTC
On Wed, Jan 8, 2025 at 10:44 AM Dimitry Andric <dim@freebsd.org> wrote: > > 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? > > -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"?