
On 1/13/06 9:29 AM, "Christopher Kohlhoff" <chris@kohlhoff.com> wrote:
--- Martin Bonner <martin.bonner@pitechnology.com> wrote:
From: Chris Cleeland
On Fri, 13 Jan 2006, Christopher Kohlhoff wrote:
Some thoughts, both for and against:
- Does unsigned char always imply 0..255? No.
So it seems that if asio is going to provide this constructor, then even if it uses unsigned char values there is the possibility (on some platforms) of out of range values.
What should happen then if an out of range value is passed? The choice is between: [TRUNCATE]
Since this is only an issue if a byte is larger than an octet, maybe you should #if-block it off when CHAR_BIT == 8, so you don't perform the unnecessary test for octet-sized bytes. (C++, and C, is forbidden on platforms where a byte is smaller than an octet.) -- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com