Disable processing of function.hpp if it is included more than once in the TU and BOOST_FUNCTION_MAX_ARGS does not change.

This commit is contained in:
Edward Diener
2017-07-06 15:37:18 -04:00
parent 44a68454aa
commit d6cff3991d
4 changed files with 118 additions and 4 deletions

View File

@ -27,6 +27,8 @@ for($on_arg = 0; $on_arg <= $max_args; ++$on_arg) {
print OUT "#elif";
}
print OUT " BOOST_FUNCTION_NUM_ARGS == $on_arg\n";
print OUT "# undef BOOST_FUNCTION_MAX_ARGS_DEFINED\n";
print OUT "# define BOOST_FUNCTION_MAX_ARGS_DEFINED $on_arg\n";
print OUT "# ifndef BOOST_FUNCTION_$on_arg\n";
print OUT "# define BOOST_FUNCTION_$on_arg\n";
print OUT "# include <boost/function/function_template.hpp>\n";