[libstdc++ PATCH] TR1 'function' and 'mem_fn' support
Chris Jefferson
caj@cs.york.ac.uk
Sat Jan 29 15:54:00 GMT 2005
Douglas Gregor wrote:
>
> On Jan 29, 2005, at 8:44 AM, Chris Jefferson wrote:
>
>> Paolo Carlini wrote:
>>
>>> Chris Jefferson wrote:
>>>
>>>> I'm happy to adapt my tuple generation program to generate this
>>>> header, which would have the advantage it would remove of 10 on the
>>>> maximum size. Of course this leads to other problems which I'm not
>>>> positive how to fix.... but it seems like it's not impossible
>>>> someone might hit the 10-parameter (I've seen functions with more,
>>>> although not in very nice code)
>>>
>>>
>>>
>>> By the way: *where* is it (the tuple generation program)?!?
>>>
>>> Assuming we really we want to go this way, we should provide it and
>>> document its usage.
>>>
>> Attached is the most recent version of the maketuples.c program,
>> which generates the header is is currently in the CVS. It could
>> perhaps do with a little more documenting, but I think it's reasonable.
>
>
> It seems like maintaining the code for TR1 in a set of C generator
> programs will be significantly harder than their preprocessor-based
> counterparts. The functional_iterate.h I submitted is annoying to work
> with (because one has to use macros for parameter lists and such), but
> it retains the essential structure of C++ code and it's easy to make
> minor tweaks to the source.
>
> If we're concerned about preprocessing time, we can always preprocess
> all of the includes of functional_iterate.h for some number of
> parameters as part of configuration.
>
I think I probably now agree. The only minor problem I have with the
macro-based system is slightly harder to later increase the limit,
should someone want to use tuples / function_wrappers / whatever with
>10 arguments / elements. I shall however agree with the maintainers on
this issue :)
Chris
More information about the Libstdc++
mailing list