Boost logo

Boost :

From: Darin Adler (darin_at_[hidden])
Date: 2001-09-06 13:52:40

on 9/6/01 11:17 AM, rwgk_at_[hidden] at rwgk_at_[hidden] wrote:

> The template class boost:array (array.hpp) does not
> include constructors. However, I believe that it would
> be useful to provide a constructor like:
> array(const T& value) { assign(value); }
> Then we would also need a default constructor:
> array() {}
> Are there possible side-effects when adding these
> constructors that I do not know about? If not, could
> these be added?

Once side effect of this is that it would allow a scalar to be implicitly
converted to array. That would suggest that if such a constructor is added,
it should be marked explicit.

    -- Darin

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