title: How can i cast a struct to a char[] array?
body: <p>I have a variable of type <code>Blah</code>.</p>
  
  <p>I want to cast it to <code>char[sizeof(blah)]</code>, without copying.<br>
  I need the type cast to be strong enough to instantiate a template that expects <code>char[N]</code>.</p>
  
  <p>I've tried many things, but i can't quite get it.<br>
  I want something like this to work correctly:</p>
  
  <pre><code>class Blah {
   int a;   
  };
  
  
  template &lt;typename T&gt;
  void foo (T&amp; a) 
  { 
      //Not an array
  }
  
  template &lt;int N&gt;
  void foo (char(&amp;a)[N]) 
  { 
      //an array!
  }
  
  Blah b;
  foo(b); //not an array
  foo((char[sizeofBlah])b); //hopefully treated as an array
  </code></pre>