[libstdc++ patch] tr1::bind, take 2
Douglas Gregor
doug.gregor@gmail.com
Wed Mar 30 05:21:00 GMT 2005
Attached is version 2 of the tr1::bind patch, which limits everything to 10
parameters (to minimize compile time). It includes Chris Jefferson's tuple
iteration header patch, so that we have a single iteration mechanism. There
are no other changes since the initial version.
Tested on i686-pc-linux-gnu. No failures on either mainline or 4.0 branch.
Okay for both mainline and 4.0?
BTW, the two Perl scripts are included for archival purposes. They're used to
generate the repeat.h and bind_repeat.h headers, so that later on we can find
ways to increase the number of parameters (e.g., based on some libstdc++
macro). But that's surely not 4.0 territory.
Doug
2005-03-29 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-29 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<>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gen_includers2.pl
Type: application/x-perl
Size: 1017 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20050330/91488811/attachment.pl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gen_includers.pl
Type: application/x-perl
Size: 4788 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20050330/91488811/attachment-0001.pl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bind-v2.patch
Type: text/x-diff
Size: 162636 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20050330/91488811/attachment.bin>
More information about the Libstdc++
mailing list