Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Bit Order in Bit Fields

Reply
Thread Tools

Bit Order in Bit Fields

 
 
Mike -- Email Ignored
Guest
Posts: n/a
 
      05-02-2009
In bit fields, am I guaranteed that the order
of the bits used is from low to high?

For example, in the fragment below, am I
guaranteed that the symbol "hi" refers to
the high order bit in an element of
type TYP (as it does on my box)?

template <class TYP>
struct Sfield
{
TYP lo : sizeof(TYP) * 8 - 1;
TYP hi : 1;
};

Thanks,
Mike.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the point of having 16 bit colour if a computer monitor can only display 8 bit colour? How do you edit 16 bit colour when you can only see 8 bit? Scotius Digital Photography 6 07-13-2010 03:33 AM
Reversing Bit Order.. i.e. MSB becomes bit 0, LSB becomes bit 15 benn686@hotmail.com C++ 9 08-22-2007 12:13 AM
order of bit fields Martin Vorbrodt C++ 6 11-03-2005 07:24 PM
64 bit - Windows Liberty 64bit, Windows Limited Edition 64 Bit, Microsoft SQL Server 2000 Developer Edition 64 Bit, IBM DB2 64 bit - new ! vvcd Computer Support 0 09-17-2004 08:15 PM
64 bit - Windows Liberty 64bit, Windows Limited Edition 64 Bit,Microsoft SQL Server 2000 Developer Edition 64 Bit, IBM DB2 64 bit - new! Ionizer Computer Support 1 01-01-2004 07:27 PM



Advertisments