This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [libstdc++ PATH] tr1::bind support
- From: Chris Jefferson <caj at cs dot york dot ac dot uk>
- To: Douglas Gregor <doug dot gregor at gmail dot com>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 20 Mar 2005 23:01:26 +0000
- Subject: Re: [libstdc++ PATH] tr1::bind support
- References: <200503201556.53335.doug.gregor@gmail.com>
Douglas Gregor wrote:
Hello,
The attached patch introduces support for tr1::bind for libstdc++-v3 (section
3.6 of TR1). Tested against i686-pc-linux-gnu, no regressions. This
particular patch is against the main trunk (4.1.0), but I would like to
commit to both the main trunk and the 4.0 branch. ChangeLog follows.
Details for those that wish to review the internals:
<snip>
1) It is a function object (with enough smarts to work with result_of), but
always takes two parameters: a reference to the bound argument and a tuple of
the arguments that were passed to bind. We use a tuple so that we require
less repetition. However, it also means that we're limited to passing 10
arguments to bind() because tuple<> accepts at most 10 parameters. See
workarounds in, e.g., mu_iterate.h.
I've briefly looked over the library and it seems good at a brief glance
:) Note that tuple is going to gain more than 10 parameters, as soon as
we decide the best way of macroising things. The two implementations
floating around (generate from a C file, which is in 4.0 and I suspect
will stay there now, and a preprocessor library) can both cope with more
than 10 paraneters.
Does the general opinion seem to be that the system used by the
non-tuple tr1 headers (non-intellegent repeated inclusion of header) the
best way to go? Or does anyone else have a preference on which way to go? :)
Chris