Robert Ramey wrote:
const int array[] = {1, 2, 3, 4};
boost::container_facadeint cfa(array, sizeof(array)/sizeof(int));
I guess my problem is I still don't understand what is wrong with
const boost::array int, 4 = { 1, 2, 3, 4 };
in this case.
If you are referring to having to dictate the
dave const in array{] = {1, 2, 3, 4};
dave boost::arrayint ba(array);
dave std::copy(ba.begin(), ba.end(), std_ostream_iteratorint(std::cout));
dave
dave Is there already a way to do this? Or is there some reason why
dave one would never want to do this?
dave
dave AFAICR boost::array allows
David B. Held wrote
Jeremy Siek [EMAIL PROTECTED] wrote in message
[...]
However, did he want the exact interface as boost::array? If so, I'd
say we need a new class called ptr_array that adapts a pointer
and a size into an array.
Or perhaps a policy-based smart pointer with an
Ramey wrote:
Actually this suits my current need. It compiles in my environment.
Does this mean its universally OK?. I thought I had seen something
like this before but couldn't find it in any of my references so I had been
trying something variations on:
If you look at the regression
Jeremy Siek [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
[...]
However, did he want the exact interface as boost::array? If so, I'd
say we need a new class called ptr_array that adapts a pointer
and a size into an array.
Or perhaps a policy-based smart pointer with an
I believe the intention of the container_facade (which I was calling
ptr_array) was that the initialization would be just of the pointer, so
the array itself would not be copied. The motivation for something like
ptr_array (versus using std::vector) is that sometimes you get chunks of
memory from
Robert Ramey wrote:
Actually this suits my current need. It compiles in my environment.
Does this mean its universally OK?. I thought I had seen something
like this before but couldn't find it in any of my references so I had been
trying something variations on:
If you look at the
- Original Message -
From: Gennaro Prota [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 07, 2002 9:26 AM
Subject: [boost] Re: Boost Array: read/write access to entire data
On Wed, 6 Nov 2002 16:21:34 -0300, Fernando Cacciola
[EMAIL PROTECTED] wrote:
OK, my fault