Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-05-17 13:09:52


"Iain K. Hanson" <iain.hanson_at_[hidden]> wrote in message
news:1116347348.14534.688.camel_at_dev-ihanson.ct.uk.videonetworks.com...
| On Tue, 2005-05-17 at 11:20 -0400, David Abrahams wrote:
| > "Thorsten Ottosen" <nesotto_at_[hidden]> writes:
| >
| > > "David Abrahams" <dave_at_[hidden]> wrote in message
|
| > ... for you. It's much less weird for me. Fixed-size arrays with
| > sentinels come up all the time in any code where the author wasn't
| > comfortable deducing array sizes, for example, in normal Python/C++
| > binding code.
|
| They are used in indefinite form of BER encoding in networking as one
| example.
|
| SOAP uses sentinels at start and end in the form of <tag> </tag>
|
| > And the other case you have to consider -- also very
| > common -- is when you have fixed-size buffers of char that aren't
| > null-terminated strings.
| >
| These are very common in networking. For buffers to be passed to 'C'
| socket library. Often declared as char[] unless dynamically allocated
| when the would be declared ( often ) as char *.

what's wrong with using boost::array<char,N> for all this?

-Thorsten


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk