Skip to content

Commit

Permalink
OK, do check _use_ as well as feature macro.
Browse files Browse the repository at this point in the history
  • Loading branch information
jtv committed Jan 15, 2025
1 parent 2a2c82f commit 2f24076
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
9 changes: 8 additions & 1 deletion config-tests/PQXX_HAVE_ASSUME.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@
# error "No support for [[assume]] attribute."
#endif

void foo() {}
#include <iostream>


void foo(int i)
{
[[assume(i > 0)]];
std::cout << i << '\n';
}
20 changes: 13 additions & 7 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -17245,10 +17245,20 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext



void foo()
#include <iostream>





void foo(int i)

{

[[assume(i > 0)]];

std::cout << i << '\n';

}


Expand Down Expand Up @@ -17587,19 +17597,15 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext



#if ! __has_cpp_attribute(likely)
#if !__has_cpp_attribute(likely)

# error "No support for [[likely]] / [[unlikely]] attributes."

#endif



void foo()

{

}
void foo() {}


_ACEOF
Expand Down

0 comments on commit 2f24076

Please sign in to comment.