Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2003-08-05 22:16:11


----- Original Message -----
From: "Philippe A. Bouchard" <philippe_at_[hidden]>
> Joe Gottman wrote:
> > They are considering a language solution. See this link:
> > http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1483.pdf
>
> Wow, that is good. I like the new syntax...
>
> 0,01$: But maybe they could add some template specifier before its
> declaration; this could help typename / non-type arguments / template
> templates arguments:
[snip example]

> foo<int, long, double>(1, 2, 3);
> foo<1, 2, 3, 4, 5>();
> foo<map, list, vector>();

You can always write a forwarding 'foo' that checks the argument types, but
I understand the reason you'd like this feature. My only question is whether
it is worth the additional machinery that it would take, e.g., would this
help a large amount of code? Perhaps you have a particular "real world" use
in mind? I can't think of one, and there's a bit of code in the paper that
uses the template varargs stuff but didn't need it.

> 0,01$: And they should rename 'the-return-type' to something else...
> something like 'nameless' or 'holotype'.

That's just a placeholder, because there was still quite a bit of discussion
of whether to call the expression-type grabber 'typeof' or 'decltype'. Any
revisions will skip the "the-return-type" placeholder and use decltype
directly.

    Doug


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk