How to initialize static array member variable?

Philippe Sigaud philippe.sigaud at gmail.com
Fri Oct 1 11:47:33 PDT 2010


On Fri, Oct 1, 2010 at 08:35, Sebastian Schuberth <sschuberth at gmail.com> wrote:

> You're right, I want exactly N T's, but from reading the section about
> "Typesafe Variadic Functions" at [1], I thought I'm doing exactly that. The
> example "For static arrays" has a comment which says for a declaration like
(...)
> would not work, so I thought "...", if following a statically sized array,
> is a special syntax to allow the array to be initialized from exactly N
> scalar values.

> So I thought I'm doing the right thing :-)

Wow, I keep forgetting about this syntax. Looking at it in the light
of your example, it seems quite useful.


Philippe


More information about the Digitalmars-d-learn mailing list