title: C++ Bitfields const expressions
body: <p>I recently was code generating some bitfields and I was using const expressions to fill out the bitfield. (C++ 03)</p>
  
  <p>I'm wondering a few things.
  1. Is this a good idea.
  2. Is this guranteed by GCC.
  3. Is this going to work (it compiles, waiting to test).</p>
  
  <pre><code>const uint16_t bitSize = 5;
  struct MyStruct
  {
      uint32_t myfield : bitSize;
  };
  </code></pre>