title: Preprocessor assertions in arduino
body: <p>If there a way to signal the Arduino preprocessor to Halt/Abort at compile time?</p>
  
  <p>I'm not very familiar with advanced preprocessor directives in general, but I have seen that there are 'libraries' for compile time assertions in some compilers.</p>
  
  <p>Background:</p>
  
  <p>In order to prevent assignments of duplicate pins in code I created an enum to identify each pin</p>
  
  <pre><code>enum DataPins
  {
      /* 00 */ UNUSED_00,
      /* 01 */ UNUSED_01,
      /* 02 */ PIN_IN_SNR0_ECHO,
      /* 03 */ PIN_IN_SNR1_ECHO,
  ...
      /* 53 */ UNUSED_53,
      /* check */ z_DONOTUSE54
  };
  </code></pre>
  
  <p>And then I'd like to check the final name to make sure it has the correct value at compile time:</p>
  
  <pre><code>#define PinsOK  z_DONOTUSE54==54
  </code></pre>
  
  <p>Is there a way to evaluate this at compile time? If so then based on that result, can I signal a compile-time error in Arduino?</p>