Boost logo

Boost :

From: Martin Bosticky (mbosticky_at_[hidden])
Date: 2004-05-13 11:20:47

>>There's probably room and need for both types of strings.
>I don't intend the char_string buffer to be increased. I intended that
>operations on the buffer would not go beyond the buffer (which would
lead >to
>overflow) and also that going over the buffer would not generate an

>It may be beneficial to have an error policy to determin the behaviour
>the event of an overflow. I am not advocating this approach, just
putting >it
>up for discussion.

In the spirit of contributing to this 'discussion', I would suggest a
size limited string that would throw exception if assigned data that is
too long. However I would also add a friend function(s) that would
assign and truncate supplied data.

So by default the string would be safe for use, but you could assign
using a 'truncation' technique in which case no exception could ever be
thrown. This would then satisfy requirements of both parties.

Martin Bosticky

This email message contains confidential information and is intended for the use of its intended recipient only. Access to this email by anyone else is unauthorised. If you are not the intended recipient you are hereby notified that any use, disclosure, copying or distribution or any action taken or omitted to be taken in reliance on it is strictly prohibited.

If this communication has been sent to you in error, please notify us immediately.

Action Information Management Ltd.
129 Devizes Road, Hilperton, Trowbridge, Wiltshire BA14 7SZ.
Tel: +44 (0) 1225 711200
Fax: +44 (0) 1225 711222
email: support_at_[hidden]

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