Boost logo

Boost :

From: Henrik Ravn (web_at_[hidden])
Date: 2002-08-21 00:36:12


> 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

Boost list run by bdawes at, gregod at, cpdaniel at, john at