This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Re: [v3] PATCH: PR 20599 (variadic templates, take two) (4/4)
- From: "Doug Gregor" <doug dot gregor at gmail dot com>
- To: "Paolo Carlini" <pcarlini at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Wed, 20 Sep 2006 14:52:24 -0400
- Subject: Re: Re: [v3] PATCH: PR 20599 (variadic templates, take two) (4/4)
- References: <5EB0664C-175A-432B-83D6-92A8FB72AC47@cs.indiana.edu> <45118541.1050507@suse.de>
On 9/20/06, Paolo Carlini <pcarlini@suse.de> wrote:
Douglas Gregor wrote:
> 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.
+ // Define a large number of placeholders. There is no way to
+ // simplify this with variadic templates, because we're introducing
+ // unique names for each.
+ namespace placeholders { namespace {
+ _Placeholder<1> _1;
[snip gazillions of placeholders]
+ } }
Certainly a minor nit, but I'm curious about this issue: are there any
concrete plans to address it? Seems strange to have it in the final
standard, I never saw something similar before...
I don't know of any plans to address this issue. TR1 basically just
says that there are objects _1, _2, _3, etc. (up to _10, at least).
Since each has a unique name, we'd need some kind of language solution
to get rid of the repetition. It doesn't fit into variadic templates
at all; I can't even think of anywhere it does fit.
Doug