reason variadic templates
Bill Baxter
dnewsgroup at billbaxter.com
Mon Oct 2 20:10:34 PDT 2006
Lionello Lunesu wrote:
> "Larry Evans" <cppljevans at cos-internet.com> wrote in message
> news:efokmo$1det$1 at digitaldaemon.com...
>> On 11/04/2005 08:03 AM, Larry Evans wrote:
>> [snip]
>>>> variadric templates would be a very nice feature however. This has come
>>>> up in
>>>> the past and Walter seemed to like the idea, so it will probably happen
>>>> eventually.
>> Doug Gregor patched g++ to implement variadic templates:
>>
>> http://archives.free.net.ph/message/20060926.213635.0a8fa8a2.en.html
>>
>> Maybe Doug's implementation would give Walter some howto ideas.
>
> I'm not into metaprogramming, but I think this would be a great feature of D
> to pick up.
>
> Already I'm noticing some D templates doing the same copy-paste trick to get
> a template to accept any number of parameters (like in the S&S examples in
> the respective thread). IIRC the was another D template library that
> actually used a D program/script to generate its .d files for any number of
> parameters! Surely we can do better than that...
>
> L.
That is pretty great.
Though I would prefer some sort of "static foreach" kind of construct
rather than having to go purely functional to use the feature.
--bb
More information about the Digitalmars-d
mailing list