This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] PATCH: PR 20599 (variadic templates, take two) (4/4)

On 19/09/06, Douglas Gregor <> wrote:
This patch addresses PR c++/20599 by introducing support for variadic

This is part 4 of 4. It contains changes to libstdc++'s TR1
implementation to make full use of variadic templates, eliminating
all of the preprocessor metaprogramming that we're using now.

I am only looking at the tuple code here (which is the only part I have personal experience with). At first glance everything appears very good.

I have one very, very minor point. The TR1 standard requires the
prototype for 'get' be:

template <int I, class T1, class T2, ..., class TN>
RJ get(tuple<T1, T2, ..., TN>& t);

whereas the prototype used here is involved in a (very clever) trick
to get an O(1) get. This could be fixed simply by wrapping get.

There is the general problem with this kind of code, which is that it
can generate a lot of very small functions which we can get in the way
of debugging and running code without optimisation. However, this is a
continuing problem with C++ and here I think the gains clearly
outweigh the losses.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]