|
Boost : |
From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2002-03-07 10:30:47
On Wednesday 06 March 2002 20:31, you wrote:
> In light of the upcoming Curacao meeting David Abrahams and
> myself are discussion a proposal for the revision of
> std::complex. Attached is one facet from our discussion. We
> would like to hear comments if there are different
> opinions.
If I understand correctly, the issue might be solved by something like
int num_complexes = 10000 ;
double* d = new double[ 2 * num_complexes ] ;
std::vector< std::complex > v( num_complexes, d ) ; // some new vector
constructor which will need to do a static_cast internally.
where the vector-constructor takes over the ownership of the array. This
would circumvent the initialisation problem (although still the layout
requirements are needed). Using this type of static_cast hack, the
initialisation issue could be moved to a policy of the vector (the policy
specifying how to allocate/initialise memory).
(I'm trying to follow the discussion and would like to help out but I'm
afraid I'm not up to the task as yet due to insufficient knowledge of the
current standard for this level of discussions)
t
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk