Boost logo

Boost :

Subject: Re: [boost] [boost::endian] Summary of discussion #1
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2010-06-14 07:47:22


Terry Golubiewski wrote:
> Rob Stewart wrote:
>
> > I suggested compressed_endian_integer. See my reply in
> > that other part of the thread for subsequent discussion
> > of such names.
>
> I think the "endian" parameter is of secondary importance and
> should be removed from the name: compressed_integer,
> packed_int, etc. The type should still have an endianness
> template paramenter, but it should default to "native".

If the type is in a namespace that indicates the handling of endianness, I'd agree. Otherwise, I think "endian" necessary in the name. If it is hoisted into the boost namespace, for example, "compressed_integer" is less useful.

> typedef packed_int<3, signed, native> int24_t;
> typedef packed_int<3, unsigned, native> uint24_t;

Using "int" in the name is short, but misleading. The underlying type may be char, short, int, long, etc., I imagine. At the least, "int" should be spelled "integer."

I still don't like "packed" for reasons I've outlined elsewhere. Vicente disliked my "reduced" suggestion (and I now recognize the mathematical connotation that might be problematic in it), so I'm not sure what else to use yet. I think in another chain of replies there was progress in another direction, so I won't pursue names further here (especially as this reply is being sent so much later than originally intended!).

_____
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk