]> AND Private Git Repository - canny.git/blob - stc/exp/ml_stc_linux_make_v1.0/include/boost/function/detail/gen_maybe_include.pl
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
1bfaab780fdd09ada3e63bea244f033f25c18589
[canny.git] / stc / exp / ml_stc_linux_make_v1.0 / include / boost / function / detail / gen_maybe_include.pl
1 #!/usr/bin/perl -w\r
2 #\r
3 # Boost.Function library\r
4 #\r
5 # Copyright (C) 2001-2003 Douglas Gregor (gregod@cs.rpi.edu)\r
6 #\r
7 # Permission to copy, use, sell and distribute this software is granted\r
8 # provided this copyright notice appears in all copies.\r
9 # Permission to modify the code and to distribute modified code is granted\r
10 # provided this copyright notice appears in all copies, and a notice\r
11 # that the code was modified is included with the copyright notice.\r
12 #\r
13 # This software is provided "as is" without express or implied warranty,\r
14 # and with no claim as to its suitability for any purpose.\r
15 #\r
16 # For more information, see http://www.boost.org\r
17 use English;\r
18 \r
19 $max_args = $ARGV[0];\r
20 \r
21 open (OUT, ">maybe_include.hpp") or die("Cannot write to maybe_include.hpp");\r
22 for($on_arg = 0; $on_arg <= $max_args; ++$on_arg) {\r
23     if ($on_arg == 0) {\r
24         print OUT "#if";\r
25     }\r
26     else {\r
27         print OUT "#elif";\r
28     }\r
29     print OUT " BOOST_FUNCTION_NUM_ARGS == $on_arg\n";\r
30     print OUT "#  ifndef BOOST_FUNCTION_$on_arg\n";\r
31     print OUT "#    define BOOST_FUNCTION_$on_arg\n";\r
32     print OUT "#    include <boost/function/function_template.hpp>\n";\r
33     print OUT "#  endif\n";\r
34 }\r
35 print OUT "#else\n";\r
36 print OUT "#  error Cannot handle Boost.Function objects that accept more than $max_args arguments!\n";\r
37 print OUT "#endif\n";\r