title: #pragma pack, template typedefs, and struct alignment
body: <p>Using Visual Studio or gcc, if I've got</p>
  
  <pre><code>#pragma pack(push, 16)
  
  typedef std::map&lt;uint32_t, uint32_t&gt; MyIntMap;
  
  #pragma pack(pop)
  </code></pre>
  
  <p>then later:</p>
  
  <pre><code>#pragma pack(push, 8)
  
  MyIntMap thisInstance;
  
  #pragma pack(pop)
  </code></pre>
  
  <p>What is the structure alignment of thisInstance?   That is, for a typedef'd template class, does pragma pack take effect at the place of the typedef or at the place of a variable definition?  If it's the latter, what's a good workaround to get a type with consistent alignment across files?</p>