|
Boost : |
Subject: Re: [boost] [boost::endian] Summary of discussion #1
From: Murilo Adriano Vasconcelos (muriloufg_at_[hidden])
Date: 2010-06-14 14:51:25
template <typename Endian, typename T, std::size_t n_bytes=8*sizeof(T),
typename Alignment = alignment::aligned>
n_bits?
2010/6/14 vicente.botet <vicente.botet_at_[hidden]>
> From: "Stewart, Robert" <Robert.Stewart_at_[hidden]>
> To: <boost_at_[hidden]>
> Sent: Monday, June 14, 2010 1:47 PM
> Subject: Re: [boost] [boost::endian] Summary of discussion #1
>
>
> >
> > 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!).
>
>
> Even if we don't have yet a clear vision of what is the endianness of a
> floating point and that we are reduced to interger types, I propose we name
> it boost::endian_holder as it is aware of the endianess and can contain UDT,
> as time_point, quantity::si::length ....
>
> template <typename Endian, typename T, std::size_t n_bytes=8*sizeof(T),
> typename Alignment = alignment::aligned>
> class endian_holder;
>
> I will let the name boost::endian_integer or boost::integer::endian for the
> class providing also the arithmetic operations.
>
> Best,
> Vicente
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>
-- Murilo Adriano Vasconcelos http://murilo.wordpress.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk