gen_function_N.pl 739 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/perl -w
  2. #
  3. # Boost.Function library
  4. #
  5. # Copyright Douglas Gregor 2001-2003. Use, modification and
  6. # distribution is subject to the Boost Software License, Version
  7. # 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  8. # http://www.boost.org/LICENSE_1_0.txt)
  9. #
  10. # For more information, see http://www.boost.org
  11. use English;
  12. if ($#ARGV < 0) {
  13. print "Usage: perl gen_function_N <number of arguments>\n";
  14. exit;
  15. }
  16. $totalNumArgs = $ARGV[0];
  17. for ($numArgs = 0; $numArgs <= $totalNumArgs; ++$numArgs) {
  18. open OUT, ">function$numArgs.hpp";
  19. print OUT "#define BOOST_FUNCTION_NUM_ARGS $numArgs\n";
  20. print OUT "#include <boost/function/detail/maybe_include.hpp>\n";
  21. print OUT "#undef BOOST_FUNCTION_NUM_ARGS\n";
  22. close OUT;
  23. }