]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Use reserved form of [[__likely__]] in <variant>
authorJonathan Wakely <jwakely@redhat.com>
Fri, 5 Jul 2024 19:00:04 +0000 (20:00 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Sat, 6 Jul 2024 20:16:53 +0000 (21:16 +0100)
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

index 13ea1dd3849657c0e3c4482794e317fb6a291dc1..3a23d9bc66d0c2321eff579d09e6fd74fd8af111 100644 (file)
@@ -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