|
Boost : |
From: Henrik Ravn (web_at_[hidden])
Date: 2002-08-21 00:36:12
Hi,
> Finally, there's the issue of default construction. If I want to
> generically declare a default-constructed object of type T, I
> can't write:
>
> T x;
>
> since builtins (and I presume, enums) won't be initialized. I
> can't write:
>
> T x();
>
> since that just declares a function. What can/should I write?
You can write:
T x(T());
which works for every type.
be well
-h-
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk