$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Miki Jovanovic (miki_at_[hidden])
Date: 2000-03-10 17:03:39
"borgerding, mark a." <marka-_at_[hidden]> wrote:
> I had an idea today for a way to more easily write portable
networking code.
Hi Mark,
Good idea all around. If I remember correctly, someone else suggested a
very similar approach some time in the past. I can't seem to find that
post now. It would be nice to find it to compare notes and to recognize
effort.
The other approach used a set of classes for representing fixed size
variables (e.g. bin_endian_uint16, little_endian_int32 etc). But I like
your template approach better.
As a very small comment, in this particular case I would avoid default
initialising variables with 0. They should really be initialised by the
user. Empty constructor:
big_endian() {}
would better mimic ordinal types.
I do think you could have structured your code better, but hey, I don't
remember anyone else commenting on style, so I won't nit-pick on it
either.
Please 'boost' your code into a boost namespace, before we suggest it
to be added into the library.
Cheers,
Miki.