> The problem is that boost::array is not a wrapper around an
> existing array, it IS an array.  This implys making a superfluous
> copy of the array in some cases.
> 
> Given an simple C array, I want a wrapper which will supply an
> iterator interface so that I can do something like.
> 
> const in array{] = {1, 2, 3, 4};
> boost::array<int> ba(array);
> std::copy(ba.begin(), ba.end(), std_ostream_iterator<int>(std::cout));
> 
> Is there already a way to do this?  Or is there some reason why
> one would never want to do this?

AFAICR boost::array allows initialization.  I would try

const boost::array<int> ba = {1, 2, 3, 4};
std::copy(ba.begin(), ba.end(), std_ostream_iterator<int>(std::cout));

Dave

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to