This one needs to be backported too.

On Sat, 6 Jul 2024 at 21:18, Jonathan Wakely <jwak...@redhat.com> wrote:
>
> Tested x86_64-linux. Pushed to trunk.
>
> -- >8 --
>
> We should not use [[unlikely]] before C++20, so use [[__unlikely__]]
> instead.
>
> libstdc++-v3/ChangeLog:
>
>         * include/std/variant (_Variant_storage::_M_reset): Use
>         __unlikely__ form of attribute instead of unlikely.
> ---
>  libstdc++-v3/include/std/variant | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libstdc++-v3/include/std/variant 
> b/libstdc++-v3/include/std/variant
> index 13ea1dd3849..3a23d9bc66d 100644
> --- a/libstdc++-v3/include/std/variant
> +++ b/libstdc++-v3/include/std/variant
> @@ -492,7 +492,7 @@ namespace __variant
>        constexpr void
>        _M_reset()
>        {
> -       if (!_M_valid()) [[unlikely]]
> +       if (!_M_valid()) [[__unlikely__]]
>           return;
>
>         std::__do_visit<void>([](auto&& __this_mem) mutable
> --
> 2.45.2
>

Reply via email to