
"Iain K. Hanson" <iain.hanson@videonetworks.com> wrote in message news:1116347348.14534.688.camel@dev-ihanson.ct.uk.videonetworks.com... | On Tue, 2005-05-17 at 11:20 -0400, David Abrahams wrote: | > "Thorsten Ottosen" <nesotto@cs.auc.dk> writes: | > | > > "David Abrahams" <dave@boost-consulting.com> 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