boost.cfg: Add configuration and tests for boost::bind() (#2206)

This commit is contained in:
Sebastian 2019-09-25 12:49:05 +02:00 committed by amai2012
parent 12f93b63a8
commit 0fadae78d3
2 changed files with 19 additions and 1 deletions

View File

@ -96,6 +96,15 @@
<not-null/>
</arg>
</function>
<!-- https://www.boost.org/doc/libs/1_71_0/libs/bind/doc/html/bind.html -->
<function name="boost::bind">
<noreturn>false</noreturn>
<use-retval/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="any"/>
</function>
<!-- boost::math classification functions -->
<!-- https://www.boost.org/doc/libs/1_69_0/libs/math/doc/html/math_toolkit/fpclass.html -->
<!-- template <class T> int fpclassify(T t); -->

View File

@ -10,6 +10,8 @@
#include <boost/config.hpp>
#include <boost/math/special_functions/round.hpp>
#include <boost/endian/conversion.hpp>
#include <boost/bind.hpp>
#include <boost/function.hpp>
BOOST_FORCEINLINE void boost_forceinline_test()
@ -24,7 +26,12 @@ BOOST_NORETURN void boost_noreturn_test()
{
}
void valid_code()
void print_hello()
{
printf("hello");
}
void valid_code(boost::function<void(void)> &pf_print_hello)
{
if (BOOST_LIKELY(1)) {
}
@ -33,6 +40,8 @@ void valid_code()
int int1 = 5;
boost::endian::endian_reverse_inplace(int1);
boost::bind(print_hello)();
pf_print_hello = boost::bind(print_hello);
}
void ignoredReturnValue(char * buf)