|
Boost : |
Subject: Re: [boost] [endian] cooperation with iostream
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2008-11-21 11:13:17
Beman Dawes wrote:
>
> Not sure I understand the request. Could you explain a bit?
>
At the moment, the library lets you define big and/or little endian types
directly in your code. Am I also correct that the main motivation of the
library is for IO?
If that's the case, instead of writing
big64_t my_integer;
my_stream >> my_integer;
I would intuitively prefer setting the endianness to be similar to setting a
property of an iostream,
int my_integer;
my_stream >> big_endian >> my_integer;
because in the first case I am expecting a performance penalty on computing
with the big64_t type, which I am not expecting for the native integer
type. I know there may be no performance penalty at all, it's just what I'm
expecting from the semantics.
Hopefully this clarifies it a bit,
Kind regards,
Rutger
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk