gcc/libstdc++-v3/scripts/gen_includers.pl

127 lines
5.7 KiB
Perl
Raw Normal View History

[multiple changes] 2005-03-31 Chris Jefferson <chris@bubblescope.net> * include/tr1/tuple: Support iteration via tuple_iterate.h. * include/tr1/tuple_iterate.h: Iteration file for tuple. 2005-03-31 Douglas Gregor <doug.gregor@gmail.com> * include/Makefile.am (tr1_headers): Add bind and mu repetition headers and reference_wrapper<> forwarding header. * include/Makefile.in: Regenerate. * include/tr1/bind_iterate.h: Implementation of function call operators for the function object returned from tr1::bind(). * include/tr1/bind_repeat.h: Bind-specific repetition header, akin to include/tr1/repeat.h. * include/tr1/functional (_Mem_fn): Bug fix: declare result member template for use with result_of. (is_bind_expression): New. (is_placeholder): New. (_Placeholder): New. Placeholder type for bind. (_Mu): New. Implementation detail of bind. (_Bind, _Bind_result): New. Function objects returned by bind. (_GLIBCXX_JOIN): New. Required to create bind placeholders. * include/tr1/functional_iterate.h (_Bind, _Bind_result, bind): New. Implementation of tr1::bind. * include/tr1/mu_iterate.h (_Mu): result template and operator() for the _Mu helper to bind. * include/tr1/ref_fwd.h (reference_wrapper): Forward declaration used by tuple header. (ref): Ditto. (cref): Ditto. * include/tr1/repeat.h: Add bind-specific repetition macros. * include/tr1/tuple: Use reference_wrapper forwarding header for initial definitions, then include <tr1/functional> at the end, to make the circular dependencies work. (tie): Support zero-argument tie() function. * testsuite/tr1/3_function_objects/bind/all_bound.cc: New test of bind() functionality with parameters bound. * testsuite/tr1/3_function_objects/bind/nested.cc: New test of nested bind() expressions. * testsuite/tr1/3_function_objects/bind/placeholders.cc: New test of bind() placeholders. * testsuite/tr1/3_function_objects/bind/ref.cc: New test of bind() with arguments bound via reference_wrapper<>. * scripts/gen_includers.pl: Generate the repetitive part of include/tr1/repeat.h. * scripts/gen_bind_includers.pl: Generate the repetitive part of include/tr1/bind_repeat.h. From-SVN: r97361
2005-04-01 05:35:59 +02:00
#!/usr/bin/perl -w
use English;
$max = shift @ARGV;
$template_params = "typename _T1";
$template_params_unnamed = "typename";
[multiple changes] 2005-03-31 Chris Jefferson <chris@bubblescope.net> * include/tr1/tuple: Support iteration via tuple_iterate.h. * include/tr1/tuple_iterate.h: Iteration file for tuple. 2005-03-31 Douglas Gregor <doug.gregor@gmail.com> * include/Makefile.am (tr1_headers): Add bind and mu repetition headers and reference_wrapper<> forwarding header. * include/Makefile.in: Regenerate. * include/tr1/bind_iterate.h: Implementation of function call operators for the function object returned from tr1::bind(). * include/tr1/bind_repeat.h: Bind-specific repetition header, akin to include/tr1/repeat.h. * include/tr1/functional (_Mem_fn): Bug fix: declare result member template for use with result_of. (is_bind_expression): New. (is_placeholder): New. (_Placeholder): New. Placeholder type for bind. (_Mu): New. Implementation detail of bind. (_Bind, _Bind_result): New. Function objects returned by bind. (_GLIBCXX_JOIN): New. Required to create bind placeholders. * include/tr1/functional_iterate.h (_Bind, _Bind_result, bind): New. Implementation of tr1::bind. * include/tr1/mu_iterate.h (_Mu): result template and operator() for the _Mu helper to bind. * include/tr1/ref_fwd.h (reference_wrapper): Forward declaration used by tuple header. (ref): Ditto. (cref): Ditto. * include/tr1/repeat.h: Add bind-specific repetition macros. * include/tr1/tuple: Use reference_wrapper forwarding header for initial definitions, then include <tr1/functional> at the end, to make the circular dependencies work. (tie): Support zero-argument tie() function. * testsuite/tr1/3_function_objects/bind/all_bound.cc: New test of bind() functionality with parameters bound. * testsuite/tr1/3_function_objects/bind/nested.cc: New test of nested bind() expressions. * testsuite/tr1/3_function_objects/bind/placeholders.cc: New test of bind() placeholders. * testsuite/tr1/3_function_objects/bind/ref.cc: New test of bind() with arguments bound via reference_wrapper<>. * scripts/gen_includers.pl: Generate the repetitive part of include/tr1/repeat.h. * scripts/gen_bind_includers.pl: Generate the repetitive part of include/tr1/bind_repeat.h. From-SVN: r97361
2005-04-01 05:35:59 +02:00
$template_args = "_T1";
$params = "_T1 __a1";
$ref_params = "_T1& __a1";
$args = "__a1";
$bind_members = "_T1 _M_arg1;";
$bind_members_init = "_M_arg1(__a1)";
$mu_get_tuple_args = "::std::tr1::get<0>(__tuple)";
$bind_v_template_args = "typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type";
$bind_v_args = "_Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS))";
$tuple_add_cref = "typename __add_c_ref<_T1>::type __a1";
$tuple_copy_init = "_M_arg1(__in._M_arg1)";
$tuple_assign = "_M_arg1 = __in._M_arg1;";
$template_params_null_class = "typename _T1 = _NullClass";
$template_args_stripped = "typename __strip_reference_wrapper<_T1>::__type";
[multiple changes] 2005-03-31 Chris Jefferson <chris@bubblescope.net> * include/tr1/tuple: Support iteration via tuple_iterate.h. * include/tr1/tuple_iterate.h: Iteration file for tuple. 2005-03-31 Douglas Gregor <doug.gregor@gmail.com> * include/Makefile.am (tr1_headers): Add bind and mu repetition headers and reference_wrapper<> forwarding header. * include/Makefile.in: Regenerate. * include/tr1/bind_iterate.h: Implementation of function call operators for the function object returned from tr1::bind(). * include/tr1/bind_repeat.h: Bind-specific repetition header, akin to include/tr1/repeat.h. * include/tr1/functional (_Mem_fn): Bug fix: declare result member template for use with result_of. (is_bind_expression): New. (is_placeholder): New. (_Placeholder): New. Placeholder type for bind. (_Mu): New. Implementation detail of bind. (_Bind, _Bind_result): New. Function objects returned by bind. (_GLIBCXX_JOIN): New. Required to create bind placeholders. * include/tr1/functional_iterate.h (_Bind, _Bind_result, bind): New. Implementation of tr1::bind. * include/tr1/mu_iterate.h (_Mu): result template and operator() for the _Mu helper to bind. * include/tr1/ref_fwd.h (reference_wrapper): Forward declaration used by tuple header. (ref): Ditto. (cref): Ditto. * include/tr1/repeat.h: Add bind-specific repetition macros. * include/tr1/tuple: Use reference_wrapper forwarding header for initial definitions, then include <tr1/functional> at the end, to make the circular dependencies work. (tie): Support zero-argument tie() function. * testsuite/tr1/3_function_objects/bind/all_bound.cc: New test of bind() functionality with parameters bound. * testsuite/tr1/3_function_objects/bind/nested.cc: New test of nested bind() expressions. * testsuite/tr1/3_function_objects/bind/placeholders.cc: New test of bind() placeholders. * testsuite/tr1/3_function_objects/bind/ref.cc: New test of bind() with arguments bound via reference_wrapper<>. * scripts/gen_includers.pl: Generate the repetitive part of include/tr1/repeat.h. * scripts/gen_bind_includers.pl: Generate the repetitive part of include/tr1/bind_repeat.h. From-SVN: r97361
2005-04-01 05:35:59 +02:00
$template_params_u = "typename _U1";
$template_args_u = "_U1";
$ref_wrap_params = "ref(__a1)";
$ref_template_args = "_T1&";
for ($num_args = 2; $num_args <= $max; ++$num_args) {
$prev_args = $num_args - 1;
$next_args = $num_args + 1;
$template_params_shifted = $template_params;
$template_args_shifted = $template_args;
$params_shifted = $params;
$args_shifted = $args;
$template_params .= ", typename _T$num_args";
$template_params_unnamed .= ", typename";
[multiple changes] 2005-03-31 Chris Jefferson <chris@bubblescope.net> * include/tr1/tuple: Support iteration via tuple_iterate.h. * include/tr1/tuple_iterate.h: Iteration file for tuple. 2005-03-31 Douglas Gregor <doug.gregor@gmail.com> * include/Makefile.am (tr1_headers): Add bind and mu repetition headers and reference_wrapper<> forwarding header. * include/Makefile.in: Regenerate. * include/tr1/bind_iterate.h: Implementation of function call operators for the function object returned from tr1::bind(). * include/tr1/bind_repeat.h: Bind-specific repetition header, akin to include/tr1/repeat.h. * include/tr1/functional (_Mem_fn): Bug fix: declare result member template for use with result_of. (is_bind_expression): New. (is_placeholder): New. (_Placeholder): New. Placeholder type for bind. (_Mu): New. Implementation detail of bind. (_Bind, _Bind_result): New. Function objects returned by bind. (_GLIBCXX_JOIN): New. Required to create bind placeholders. * include/tr1/functional_iterate.h (_Bind, _Bind_result, bind): New. Implementation of tr1::bind. * include/tr1/mu_iterate.h (_Mu): result template and operator() for the _Mu helper to bind. * include/tr1/ref_fwd.h (reference_wrapper): Forward declaration used by tuple header. (ref): Ditto. (cref): Ditto. * include/tr1/repeat.h: Add bind-specific repetition macros. * include/tr1/tuple: Use reference_wrapper forwarding header for initial definitions, then include <tr1/functional> at the end, to make the circular dependencies work. (tie): Support zero-argument tie() function. * testsuite/tr1/3_function_objects/bind/all_bound.cc: New test of bind() functionality with parameters bound. * testsuite/tr1/3_function_objects/bind/nested.cc: New test of nested bind() expressions. * testsuite/tr1/3_function_objects/bind/placeholders.cc: New test of bind() placeholders. * testsuite/tr1/3_function_objects/bind/ref.cc: New test of bind() with arguments bound via reference_wrapper<>. * scripts/gen_includers.pl: Generate the repetitive part of include/tr1/repeat.h. * scripts/gen_bind_includers.pl: Generate the repetitive part of include/tr1/bind_repeat.h. From-SVN: r97361
2005-04-01 05:35:59 +02:00
$template_args .= ", _T$num_args";
$params .= ", _T$num_args __a$num_args";
$ref_params .=", _T$num_args& __a$num_args";
$args .= ", __a$num_args";
$bind_members .= " _T$num_args _M_arg$num_args;";
$bind_members_init .= ", _M_arg$num_args(__a$num_args)";
$mu_get_tuple_args .= ", ::std::tr1::get<$prev_args>(__tuple)";
$bind_v_template_args .= ", typename result_of<_Mu<_T$num_args> _CV(_T$num_args, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type";
$bind_v_args .= ", _Mu<_T$num_args>()(_M_arg$num_args, ::std::tr1::tie(_GLIBCXX_BIND_ARGS))";
$tuple_add_cref .= ", typename __add_c_ref<_T$num_args>::type __a$num_args";
$tuple_copy_init .= ", _M_arg$num_args(__in._M_arg$num_args)";
$tuple_assign .= " _M_arg$num_args = __in._M_arg$num_args;";
$template_params_null_class .= ", typename _T$num_args = _NullClass";
$template_args_stripped .= ", typename __strip_reference_wrapper<_T$num_args>::__type";
[multiple changes] 2005-03-31 Chris Jefferson <chris@bubblescope.net> * include/tr1/tuple: Support iteration via tuple_iterate.h. * include/tr1/tuple_iterate.h: Iteration file for tuple. 2005-03-31 Douglas Gregor <doug.gregor@gmail.com> * include/Makefile.am (tr1_headers): Add bind and mu repetition headers and reference_wrapper<> forwarding header. * include/Makefile.in: Regenerate. * include/tr1/bind_iterate.h: Implementation of function call operators for the function object returned from tr1::bind(). * include/tr1/bind_repeat.h: Bind-specific repetition header, akin to include/tr1/repeat.h. * include/tr1/functional (_Mem_fn): Bug fix: declare result member template for use with result_of. (is_bind_expression): New. (is_placeholder): New. (_Placeholder): New. Placeholder type for bind. (_Mu): New. Implementation detail of bind. (_Bind, _Bind_result): New. Function objects returned by bind. (_GLIBCXX_JOIN): New. Required to create bind placeholders. * include/tr1/functional_iterate.h (_Bind, _Bind_result, bind): New. Implementation of tr1::bind. * include/tr1/mu_iterate.h (_Mu): result template and operator() for the _Mu helper to bind. * include/tr1/ref_fwd.h (reference_wrapper): Forward declaration used by tuple header. (ref): Ditto. (cref): Ditto. * include/tr1/repeat.h: Add bind-specific repetition macros. * include/tr1/tuple: Use reference_wrapper forwarding header for initial definitions, then include <tr1/functional> at the end, to make the circular dependencies work. (tie): Support zero-argument tie() function. * testsuite/tr1/3_function_objects/bind/all_bound.cc: New test of bind() functionality with parameters bound. * testsuite/tr1/3_function_objects/bind/nested.cc: New test of nested bind() expressions. * testsuite/tr1/3_function_objects/bind/placeholders.cc: New test of bind() placeholders. * testsuite/tr1/3_function_objects/bind/ref.cc: New test of bind() with arguments bound via reference_wrapper<>. * scripts/gen_includers.pl: Generate the repetitive part of include/tr1/repeat.h. * scripts/gen_bind_includers.pl: Generate the repetitive part of include/tr1/bind_repeat.h. From-SVN: r97361
2005-04-01 05:35:59 +02:00
$template_params_u .= ", typename _U$num_args";
$template_args_u .= ", _U$num_args";
$ref_wrap_params .= ", ref(__a$num_args)";
$ref_template_args .= ", _T$num_args&";
if ($num_args == $max) {
print "#define _GLIBCXX_LAST_INCLUDE\n"
}
[multiple changes] 2005-03-31 Chris Jefferson <chris@bubblescope.net> * include/tr1/tuple: Support iteration via tuple_iterate.h. * include/tr1/tuple_iterate.h: Iteration file for tuple. 2005-03-31 Douglas Gregor <doug.gregor@gmail.com> * include/Makefile.am (tr1_headers): Add bind and mu repetition headers and reference_wrapper<> forwarding header. * include/Makefile.in: Regenerate. * include/tr1/bind_iterate.h: Implementation of function call operators for the function object returned from tr1::bind(). * include/tr1/bind_repeat.h: Bind-specific repetition header, akin to include/tr1/repeat.h. * include/tr1/functional (_Mem_fn): Bug fix: declare result member template for use with result_of. (is_bind_expression): New. (is_placeholder): New. (_Placeholder): New. Placeholder type for bind. (_Mu): New. Implementation detail of bind. (_Bind, _Bind_result): New. Function objects returned by bind. (_GLIBCXX_JOIN): New. Required to create bind placeholders. * include/tr1/functional_iterate.h (_Bind, _Bind_result, bind): New. Implementation of tr1::bind. * include/tr1/mu_iterate.h (_Mu): result template and operator() for the _Mu helper to bind. * include/tr1/ref_fwd.h (reference_wrapper): Forward declaration used by tuple header. (ref): Ditto. (cref): Ditto. * include/tr1/repeat.h: Add bind-specific repetition macros. * include/tr1/tuple: Use reference_wrapper forwarding header for initial definitions, then include <tr1/functional> at the end, to make the circular dependencies work. (tie): Support zero-argument tie() function. * testsuite/tr1/3_function_objects/bind/all_bound.cc: New test of bind() functionality with parameters bound. * testsuite/tr1/3_function_objects/bind/nested.cc: New test of nested bind() expressions. * testsuite/tr1/3_function_objects/bind/placeholders.cc: New test of bind() placeholders. * testsuite/tr1/3_function_objects/bind/ref.cc: New test of bind() with arguments bound via reference_wrapper<>. * scripts/gen_includers.pl: Generate the repetitive part of include/tr1/repeat.h. * scripts/gen_bind_includers.pl: Generate the repetitive part of include/tr1/bind_repeat.h. From-SVN: r97361
2005-04-01 05:35:59 +02:00
print "#define _GLIBCXX_NUM_ARGS $num_args\n";
print "#define _GLIBCXX_COMMA ,\n";
print "#define _GLIBCXX_TEMPLATE_PARAMS $template_params\n";
print "#define _GLIBCXX_TEMPLATE_ARGS $template_args\n";
print "#define _GLIBCXX_PARAMS $params\n";
print "#define _GLIBCXX_REF_PARAMS $ref_params\n";
print "#define _GLIBCXX_ARGS $args\n";
print "#define _GLIBCXX_COMMA_SHIFTED ,\n";
print "#define _GLIBCXX_TEMPLATE_PARAMS_SHIFTED $template_params_shifted\n";
print "#define _GLIBCXX_TEMPLATE_ARGS_SHIFTED $template_args_shifted\n";
print "#define _GLIBCXX_PARAMS_SHIFTED $params_shifted\n";
print "#define _GLIBCXX_ARGS_SHIFTED $args_shifted\n";
print "#define _GLIBCXX_BIND_MEMBERS $bind_members\n";
print "#define _GLIBCXX_BIND_MEMBERS_INIT $bind_members_init\n";
print "#define _GLIBCXX_MU_GET_TUPLE_ARGS $mu_get_tuple_args\n";
print "#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) $bind_v_template_args\n";
print "#define _GLIBCXX_BIND_V_ARGS $bind_v_args\n";
print "#define _GLIBCXX_TUPLE_ADD_CREF $tuple_add_cref\n";
print "#define _GLIBCXX_TUPLE_COPY_INIT $tuple_copy_init\n";
print "#define _GLIBCXX_TUPLE_ASSIGN $tuple_assign\n";
print "#define _GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS $template_params_null_class\n";
print "#define _GLIBCXX_TEMPLATE_ARGS_STRIPPED $template_args_stripped\n";
[multiple changes] 2005-03-31 Chris Jefferson <chris@bubblescope.net> * include/tr1/tuple: Support iteration via tuple_iterate.h. * include/tr1/tuple_iterate.h: Iteration file for tuple. 2005-03-31 Douglas Gregor <doug.gregor@gmail.com> * include/Makefile.am (tr1_headers): Add bind and mu repetition headers and reference_wrapper<> forwarding header. * include/Makefile.in: Regenerate. * include/tr1/bind_iterate.h: Implementation of function call operators for the function object returned from tr1::bind(). * include/tr1/bind_repeat.h: Bind-specific repetition header, akin to include/tr1/repeat.h. * include/tr1/functional (_Mem_fn): Bug fix: declare result member template for use with result_of. (is_bind_expression): New. (is_placeholder): New. (_Placeholder): New. Placeholder type for bind. (_Mu): New. Implementation detail of bind. (_Bind, _Bind_result): New. Function objects returned by bind. (_GLIBCXX_JOIN): New. Required to create bind placeholders. * include/tr1/functional_iterate.h (_Bind, _Bind_result, bind): New. Implementation of tr1::bind. * include/tr1/mu_iterate.h (_Mu): result template and operator() for the _Mu helper to bind. * include/tr1/ref_fwd.h (reference_wrapper): Forward declaration used by tuple header. (ref): Ditto. (cref): Ditto. * include/tr1/repeat.h: Add bind-specific repetition macros. * include/tr1/tuple: Use reference_wrapper forwarding header for initial definitions, then include <tr1/functional> at the end, to make the circular dependencies work. (tie): Support zero-argument tie() function. * testsuite/tr1/3_function_objects/bind/all_bound.cc: New test of bind() functionality with parameters bound. * testsuite/tr1/3_function_objects/bind/nested.cc: New test of nested bind() expressions. * testsuite/tr1/3_function_objects/bind/placeholders.cc: New test of bind() placeholders. * testsuite/tr1/3_function_objects/bind/ref.cc: New test of bind() with arguments bound via reference_wrapper<>. * scripts/gen_includers.pl: Generate the repetitive part of include/tr1/repeat.h. * scripts/gen_bind_includers.pl: Generate the repetitive part of include/tr1/bind_repeat.h. From-SVN: r97361
2005-04-01 05:35:59 +02:00
print "#define _GLIBCXX_TEMPLATE_PARAMS_U $template_params_u\n";
print "#define _GLIBCXX_TEMPLATE_ARGS_U $template_args_u\n";
print "#define _GLIBCXX_REF_WRAP_PARAMS $ref_wrap_params\n";
print "#define _GLIBCXX_REF_TEMPLATE_ARGS $ref_template_args\n";
print "#define _GLIBCXX_NUM_ARGS_PLUS_1 $next_args\n";
print "#define _GLIBCXX_T_NUM_ARGS_PLUS_1 _T$next_args\n";
[multiple changes] 2005-03-31 Chris Jefferson <chris@bubblescope.net> * include/tr1/tuple: Support iteration via tuple_iterate.h. * include/tr1/tuple_iterate.h: Iteration file for tuple. 2005-03-31 Douglas Gregor <doug.gregor@gmail.com> * include/Makefile.am (tr1_headers): Add bind and mu repetition headers and reference_wrapper<> forwarding header. * include/Makefile.in: Regenerate. * include/tr1/bind_iterate.h: Implementation of function call operators for the function object returned from tr1::bind(). * include/tr1/bind_repeat.h: Bind-specific repetition header, akin to include/tr1/repeat.h. * include/tr1/functional (_Mem_fn): Bug fix: declare result member template for use with result_of. (is_bind_expression): New. (is_placeholder): New. (_Placeholder): New. Placeholder type for bind. (_Mu): New. Implementation detail of bind. (_Bind, _Bind_result): New. Function objects returned by bind. (_GLIBCXX_JOIN): New. Required to create bind placeholders. * include/tr1/functional_iterate.h (_Bind, _Bind_result, bind): New. Implementation of tr1::bind. * include/tr1/mu_iterate.h (_Mu): result template and operator() for the _Mu helper to bind. * include/tr1/ref_fwd.h (reference_wrapper): Forward declaration used by tuple header. (ref): Ditto. (cref): Ditto. * include/tr1/repeat.h: Add bind-specific repetition macros. * include/tr1/tuple: Use reference_wrapper forwarding header for initial definitions, then include <tr1/functional> at the end, to make the circular dependencies work. (tie): Support zero-argument tie() function. * testsuite/tr1/3_function_objects/bind/all_bound.cc: New test of bind() functionality with parameters bound. * testsuite/tr1/3_function_objects/bind/nested.cc: New test of nested bind() expressions. * testsuite/tr1/3_function_objects/bind/placeholders.cc: New test of bind() placeholders. * testsuite/tr1/3_function_objects/bind/ref.cc: New test of bind() with arguments bound via reference_wrapper<>. * scripts/gen_includers.pl: Generate the repetitive part of include/tr1/repeat.h. * scripts/gen_bind_includers.pl: Generate the repetitive part of include/tr1/bind_repeat.h. From-SVN: r97361
2005-04-01 05:35:59 +02:00
print "#include _GLIBCXX_REPEAT_HEADER\n";
print "#undef _GLIBCXX_T_NUM_ARGS_PLUS_1\n";
[multiple changes] 2005-03-31 Chris Jefferson <chris@bubblescope.net> * include/tr1/tuple: Support iteration via tuple_iterate.h. * include/tr1/tuple_iterate.h: Iteration file for tuple. 2005-03-31 Douglas Gregor <doug.gregor@gmail.com> * include/Makefile.am (tr1_headers): Add bind and mu repetition headers and reference_wrapper<> forwarding header. * include/Makefile.in: Regenerate. * include/tr1/bind_iterate.h: Implementation of function call operators for the function object returned from tr1::bind(). * include/tr1/bind_repeat.h: Bind-specific repetition header, akin to include/tr1/repeat.h. * include/tr1/functional (_Mem_fn): Bug fix: declare result member template for use with result_of. (is_bind_expression): New. (is_placeholder): New. (_Placeholder): New. Placeholder type for bind. (_Mu): New. Implementation detail of bind. (_Bind, _Bind_result): New. Function objects returned by bind. (_GLIBCXX_JOIN): New. Required to create bind placeholders. * include/tr1/functional_iterate.h (_Bind, _Bind_result, bind): New. Implementation of tr1::bind. * include/tr1/mu_iterate.h (_Mu): result template and operator() for the _Mu helper to bind. * include/tr1/ref_fwd.h (reference_wrapper): Forward declaration used by tuple header. (ref): Ditto. (cref): Ditto. * include/tr1/repeat.h: Add bind-specific repetition macros. * include/tr1/tuple: Use reference_wrapper forwarding header for initial definitions, then include <tr1/functional> at the end, to make the circular dependencies work. (tie): Support zero-argument tie() function. * testsuite/tr1/3_function_objects/bind/all_bound.cc: New test of bind() functionality with parameters bound. * testsuite/tr1/3_function_objects/bind/nested.cc: New test of nested bind() expressions. * testsuite/tr1/3_function_objects/bind/placeholders.cc: New test of bind() placeholders. * testsuite/tr1/3_function_objects/bind/ref.cc: New test of bind() with arguments bound via reference_wrapper<>. * scripts/gen_includers.pl: Generate the repetitive part of include/tr1/repeat.h. * scripts/gen_bind_includers.pl: Generate the repetitive part of include/tr1/bind_repeat.h. From-SVN: r97361
2005-04-01 05:35:59 +02:00
print "#undef _GLIBCXX_NUM_ARGS_PLUS_1\n";
print "#undef _GLIBCXX_REF_TEMPLATE_ARGS\n";
print "#undef _GLIBCXX_REF_WRAP_PARAMS\n";
print "#undef _GLIBCXX_TEMPLATE_ARGS_U\n";
print "#undef _GLIBCXX_TEMPLATE_PARAMS_U\n";
print "#undef _GLIBCXX_TEMPLATE_ARGS_STRIPPED\n";
print "#undef _GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS\n";
[multiple changes] 2005-03-31 Chris Jefferson <chris@bubblescope.net> * include/tr1/tuple: Support iteration via tuple_iterate.h. * include/tr1/tuple_iterate.h: Iteration file for tuple. 2005-03-31 Douglas Gregor <doug.gregor@gmail.com> * include/Makefile.am (tr1_headers): Add bind and mu repetition headers and reference_wrapper<> forwarding header. * include/Makefile.in: Regenerate. * include/tr1/bind_iterate.h: Implementation of function call operators for the function object returned from tr1::bind(). * include/tr1/bind_repeat.h: Bind-specific repetition header, akin to include/tr1/repeat.h. * include/tr1/functional (_Mem_fn): Bug fix: declare result member template for use with result_of. (is_bind_expression): New. (is_placeholder): New. (_Placeholder): New. Placeholder type for bind. (_Mu): New. Implementation detail of bind. (_Bind, _Bind_result): New. Function objects returned by bind. (_GLIBCXX_JOIN): New. Required to create bind placeholders. * include/tr1/functional_iterate.h (_Bind, _Bind_result, bind): New. Implementation of tr1::bind. * include/tr1/mu_iterate.h (_Mu): result template and operator() for the _Mu helper to bind. * include/tr1/ref_fwd.h (reference_wrapper): Forward declaration used by tuple header. (ref): Ditto. (cref): Ditto. * include/tr1/repeat.h: Add bind-specific repetition macros. * include/tr1/tuple: Use reference_wrapper forwarding header for initial definitions, then include <tr1/functional> at the end, to make the circular dependencies work. (tie): Support zero-argument tie() function. * testsuite/tr1/3_function_objects/bind/all_bound.cc: New test of bind() functionality with parameters bound. * testsuite/tr1/3_function_objects/bind/nested.cc: New test of nested bind() expressions. * testsuite/tr1/3_function_objects/bind/placeholders.cc: New test of bind() placeholders. * testsuite/tr1/3_function_objects/bind/ref.cc: New test of bind() with arguments bound via reference_wrapper<>. * scripts/gen_includers.pl: Generate the repetitive part of include/tr1/repeat.h. * scripts/gen_bind_includers.pl: Generate the repetitive part of include/tr1/bind_repeat.h. From-SVN: r97361
2005-04-01 05:35:59 +02:00
print "#undef _GLIBCXX_TUPLE_ASSIGN\n";
print "#undef _GLIBCXX_TUPLE_COPY_INIT\n";
print "#undef _GLIBCXX_TUPLE_ADD_CREF\n";
print "#undef _GLIBCXX_BIND_V_ARGS\n";
print "#undef _GLIBCXX_BIND_V_TEMPLATE_ARGS\n";
print "#undef _GLIBCXX_MU_GET_TUPLE_ARGS\n";
print "#undef _GLIBCXX_BIND_MEMBERS_INIT\n";
print "#undef _GLIBCXX_BIND_MEMBERS\n";
print "#undef _GLIBCXX_ARGS_SHIFTED\n";
print "#undef _GLIBCXX_PARAMS_SHIFTED\n";
print "#undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED\n";
print "#undef _GLIBCXX_TEMPLATE_PARAMS_SHIFTED\n";
print "#undef _GLIBCXX_COMMA_SHIFTED\n";
print "#undef _GLIBCXX_ARGS\n";
print "#undef _GLIBCXX_REF_PARAMS\n";
print "#undef _GLIBCXX_PARAMS\n";
print "#undef _GLIBCXX_TEMPLATE_ARGS\n";
print "#undef _GLIBCXX_TEMPLATE_PARAMS\n";
print "#undef _GLIBCXX_COMMA\n";
print "#undef _GLIBCXX_NUM_ARGS\n";
if ($num_args == $max) {
print "#undef _GLIBCXX_LAST_INCLUDE\n"
}
[multiple changes] 2005-03-31 Chris Jefferson <chris@bubblescope.net> * include/tr1/tuple: Support iteration via tuple_iterate.h. * include/tr1/tuple_iterate.h: Iteration file for tuple. 2005-03-31 Douglas Gregor <doug.gregor@gmail.com> * include/Makefile.am (tr1_headers): Add bind and mu repetition headers and reference_wrapper<> forwarding header. * include/Makefile.in: Regenerate. * include/tr1/bind_iterate.h: Implementation of function call operators for the function object returned from tr1::bind(). * include/tr1/bind_repeat.h: Bind-specific repetition header, akin to include/tr1/repeat.h. * include/tr1/functional (_Mem_fn): Bug fix: declare result member template for use with result_of. (is_bind_expression): New. (is_placeholder): New. (_Placeholder): New. Placeholder type for bind. (_Mu): New. Implementation detail of bind. (_Bind, _Bind_result): New. Function objects returned by bind. (_GLIBCXX_JOIN): New. Required to create bind placeholders. * include/tr1/functional_iterate.h (_Bind, _Bind_result, bind): New. Implementation of tr1::bind. * include/tr1/mu_iterate.h (_Mu): result template and operator() for the _Mu helper to bind. * include/tr1/ref_fwd.h (reference_wrapper): Forward declaration used by tuple header. (ref): Ditto. (cref): Ditto. * include/tr1/repeat.h: Add bind-specific repetition macros. * include/tr1/tuple: Use reference_wrapper forwarding header for initial definitions, then include <tr1/functional> at the end, to make the circular dependencies work. (tie): Support zero-argument tie() function. * testsuite/tr1/3_function_objects/bind/all_bound.cc: New test of bind() functionality with parameters bound. * testsuite/tr1/3_function_objects/bind/nested.cc: New test of nested bind() expressions. * testsuite/tr1/3_function_objects/bind/placeholders.cc: New test of bind() placeholders. * testsuite/tr1/3_function_objects/bind/ref.cc: New test of bind() with arguments bound via reference_wrapper<>. * scripts/gen_includers.pl: Generate the repetitive part of include/tr1/repeat.h. * scripts/gen_bind_includers.pl: Generate the repetitive part of include/tr1/bind_repeat.h. From-SVN: r97361
2005-04-01 05:35:59 +02:00
}
print "\n";
print "#ifndef _GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS\n";
print "# define _GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS $template_params\n";
print "# define _GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS_UNNAMED $template_params_unnamed\n";
print "# define _GLIBCXX_TUPLE_ALL_TEMPLATE_ARGS $template_args\n";
print "#endif\n";
print "\n";