Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/attr-likely6.C

raw
1 // PR c++/92343
2 // { dg-do compile { target c++14 } }
3
4 constexpr bool
5 foo (bool x)
6 {
7 if (x)
8 [[unlikely]] return true;
9 else
10 [[likely]] return false;
11 }
12
13 static_assert (foo (true), "");
14 static_assert (!foo (false), "");