title: Is it possible to use compile time asserts in C++
body: <p>I want to use a template for some data processing, but I need the code to be more or less safe when ported.</p>
  
  <p>This might be a problem if sizes of variables grow beyond anticipated values, so I would like to assert at compile time that some assumptions are still valid.</p>
  
  <p>For example, <code>sizeof(long)&gt;sizeof(int)</code>, so that if this assumption fails, I could break the build.</p>
  
  <p>I know that standard mandates that <code>long&gt;=int</code>, but this is just an example, don't concentrate on the variable types.</p>