Boost logo

Boost :

Subject: Re: [boost] [boost::endian] Summary of discussion #1
From: Jonathan Franklin (franklin.jonathan_at_[hidden])
Date: 2010-06-04 12:48:07


On Fri, Jun 4, 2010 at 10:33 AM, Stewart, Robert <Robert.Stewart_at_[hidden]> wrote:
> Jonathan Franklin wrote:
>> To whit, GCC supports struct packing via the __packed__ attribute:
>> http://gcc.gnu.org/onlinedocs/gcc/Type-Attributes.html
>
> That's for a UDT, not for an int.

Of course. The point is that packing has a well-known meaning. If
you rethink your concept of packing in terms of bits in an int
representation, you can reword the verbiage in the link like so:

This attribute, attached to an *integral type* definition, specifies
that each *bit* of the *integral type* is placed to minimize the
memory required.

>> I'm not a linguist, but I use pack as a noun all the time.  Whenever I
>> feel like rock climbing, I grab my gear pack and head for the crag.
>
> Of course "pack" can be a noun.  I didn't say otherwise (presuming that your reference to nouns versus verbs was in reference to one of my posts on that point).

Perhaps I misread. My recollection is that it was claimed the "pack"
label was no good because it is a verb, not a noun. I'm sure I'm
remembering this wrong, and it isn't worth looking up or revisiting.
Sorry for bringing it up.

> However, just as you've used it, a "pack" is a collection or holder of things.  Hence, it doesn't work in this context because the type in question holds a single integer type of some number of bits/octets.

Again, an integral type is a collection of bits, which some people,
other than yourself, might like to pack into a... pack.
;-)

And this is purely a semantic discussion now, so I'm exiting post-haste.

Jon


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