Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp2a
/
attr-likely6.C
blob: a04021e503753210554df0dd15abd7911647330c [
file
] [
log
] [
blame
]
// PR c++/92343
// { dg-do compile { target c++14 } }
constexpr
bool
foo
(
bool
x
)
{
if
(
x
)
[[
unlikely
]]
return
true
;
else
[[
likely
]]
return
false
;
}
static_assert
(
foo
(
true
),
""
);
static_assert
(!
foo
(
false
),
""
);