[v3] Fully preprocessorify TR1 tuples
Doug Gregor
dgregor@cs.indiana.edu
Fri Oct 13 18:41:00 GMT 2006
Hi folks,
The TR1 function objects are fully preprocessor-based, so that
tweaking the "repeat.h" and "bind_repeat.h" headers allow us to
change the maximum number of parameter supported. TR1 tuples were 95%
of the way there; this patch finishes the job. The two Perl scripts
are used to generate repeat.h and bind_repeat.h; I'm including them
in the e-mail for archival purposes, to make it easier to change the
number of support parameters later.
Test powerpc-apple-darwin8.8.0; no regressions.
Cheers,
Doug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tr1-full-meta.patch
Type: application/octet-stream
Size: 35666 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20061013/5618f0c9/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gen_includers.pl
Type: text/x-perl-script
Size: 5860 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20061013/5618f0c9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gen_includers2.pl
Type: text/x-perl-script
Size: 1017 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20061013/5618f0c9/attachment-0001.bin>
-------------- next part --------------
2006-10-13 Douglas Gregor <doug.gregor@gmail.com>
* include/Makefile.in (tr1_headers): Add new tuple_defs.h.
* include/tr1/tuple (tuple): Move declaration to tuple_defs.h.
(get): Ditto.
(operator==): Ditto.
(operator<): Ditto.
(operator!=): Ditto.
(operator>): Ditto.
(operator<=): Ditto.
(operator>=): Ditto.
(__stripped_tuple_type): Ditto.
Include tuple.defs.h
* include/tr1/tuple_iterate.h (tuple): Use
_GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS_UNNAMED macro instead of 10
"typename"s.
(tuple_element): Use _GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS and
_GLIBCXX_TYPLE_ALL_TEMPLATE_ARGS instead of 10
parameters/arguments.
* include/tr1/tuple_defs.h: New header, contains declarations and
definitions for the tuple template with all arguments.
* include/tr1/repeat.h (_GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS): New.
(_GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS_UNNAMED): New.
(_GLIBCXX_TUPLE_ALL_TEMPLATE_ARGS): New.
(_GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS): New.
(_GLIBCXX_TEMPLATE_ARGS_STRIPPED): New.
* include/Makefile.am (tr1_headers): Add new tuple_defs.h.
More information about the Libstdc++
mailing list