title: Use static_assert to check types passed to macro
body: <p>I unfortunately have several macros left over from the original version of my library that employed some pretty crazy C. In particular, I have a series of macros that expect certain types to be passed to them. <strong>Is it possible to do something along the lines of:</strong></p>
  
  <pre><code>static_assert(decltype(retval) == bool);
  </code></pre>
  
  <p><strong>And how? Are there any clever alternatives?</strong></p>
  
  <p>Yes I'm aware macros are bad. I'm aware C++ is not C, etc.</p>
  
  <h2>Update0</h2>
  
  <p>Here is some <a href="http://pastebin.com/vSanw492" rel="noreferrer">related code</a>, and the <a href="http://code.google.com/p/cpfs/source/browse/libcpfs/cpfs.cc" rel="noreferrer">source file</a>. Suggestions are welcome. The original question remains the same.</p>