Files
BackOne/ext/libpqxx-7.7.3/config-tests/likely.cxx
T
dsutanto dbdc5bcc4a
/ build_macos (push) Has been cancelled
/ build_windows (push) Has been cancelled
/ build_ubuntu (push) Has been cancelled
First Commit
2025-11-19 16:23:45 +07:00

16 lines
259 B
C++

// Test for C++20 [[likely]] and [[unlikely]] attributes.
int main(int argc, char **)
{
#if __cplusplus < 202002L
deliberately_fail(because, older, C++, standard);
#endif
int x = 0;
if (argc == 1) [[likely]]
x = 0;
else
x = 1;
return x;
}