Re: What llvm16 libc++ updates for -std=c++20 use [was: Re: Delay in 14.0-RELEASE cycle and blocking items]

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Thu, 04 May 2023 01:56:34 UTC
Mark Millard <marklmi@yahoo.com> writes:

> Alexey Dokuchaev <danfe_at_freebsd.org> wrote on
> Date: Wed, 03 May 2023 07:53:09 UTC :
>
>> On Mon, May 01, 2023 at 06:14:49PM +0000, Glen Barber wrote:
>> > ...
>> > There is no feasible way we are going to make the branch point of
>> > stable/14 in time, with that scheduled for May 12, 2023 with the above
>> > points. That said, this is not an all-inclusive list, but the more
>> > major items on our radar at the moment.
>> 
>> Does this delay mean we might get Clang 16 in the base? Current 15.0.7
>> hits assertion on one of my ports which had allegedly been fixed in 16.
>> Also, AFAIU it comes with better support for modern C++, e.g. ranges.
>
> These notes are based on using -std=c++20 and llvm16 on
> opensuse tumblweed (in early April), which has libc++
> support configurable. They also presume that the FreeBSD
> llvm16 update fully adopts the libc++ from llvm16.
> (FreeBSD LLVM upgrades do not always do so at the initial
> upgrade time.)

FWIW, std::ranges in base libc++ 16 (via llvm-16-update branch) works
fine at least in emulators/yuzu (c++20) and x11-wm/hyprland (c++23).
More can take advantage but currently use a workaround e.g.,

$ rg -l :devel/range-v3 | sed s,/Makefile,,
biology/seqan3
devel/fbthrift
editors/imhex
lang/solidity
net-im/telegram-desktop