title: Generating an error if checked boolean macro is not defined
body: <p>I have several configuration files each one containing the definition of some boolean macro, to be set to 0 or 1. Then, in my code, I check the value of such a macro to decide which part of the code to activate. Now comes the tricky part: I want to be sure that the header containing the definition of my macro has been included. </p>
  
  <p>In the following example, if I forget to include the header file containing FOO definition, the compiler will print "world!", while I would like instead that it generated an error.</p>
  
  <pre><code>//in the configuration header file
  #define FOO 1
  
  //in a cpp file
  #if FOO  //I would like this to generate an error if I forgot to include the header file
  #pragma message "Hello"
  #else
  #pragma message "world!"
  #endif
  </code></pre>
  
  <p>Is it possible to achieve such a behaviour? How?</p>
  
  <p>To clarify, I am not asking <a href="https://stackoverflow.com/questions/2221517/how-to-generate-an-error-and-warning-in-c-preprocessor">how to generate an error if a macro is not defined</a>, but if it is possible to transform the <code>#if FOO</code> line so that, at the same time, it checks the boolean value and generates an error if <code>FOO</code> is not defined.</p>
  
  <p>The point of having this would be that developers would know that their code should contain</p>
  
  <pre><code>SPECIAL_MACRO(FOO)
  </code></pre>
  
  <p>which, at the same time, check the boolean value of FOO as if it was an <code>#if FOO</code> statement, and prevents them from forgetting the inclusion of the header defining <code>FOO</code>.</p>