Boost logo

Boost :

From: Yitzhak Sapir (yitzhaks_at_[hidden])
Date: 2002-10-30 05:28:09

Would it be possible to request that Boost Array provide read/write access
to the internal array data? I've been using array.elems for this at
first, but apparently, elems is public only to provide {...}
initialization lists. (I consider such initialization lists important
since a global array object will now behave like a global array in all
that concerns order of initialization of objects in the system). However,
I'd also like to be able to have read/write access. For example, if I use
a Win32 API ::ReadFile to read from a pipe that I created, I would like to
provide the array as the buffer. Many other API functions take a buffer
and length type arguments, and even portable object-oriented systems have
such functions such as the ACE Communication Framework. In those cases I'd
like to use a boost::array<> to encapsulate an array (even if just so I
can write: peer().recv(buffer, buffer.static_size, 0) in ACE), but without
read/write access to the internal array, I cannot, and I feel
uncomfortable accessing an undocument class member that is public only
because of a design constraint.

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