title: Conditional Compilation Based on Type of #define variables
body: <p>Following is clipped version of what I am trying to achive. I am doing some bit arithmatic on a word, I would like to use <code>__builtin_clrsb</code> when it is available and the user uses <code>int</code> as the word type else compile with slow algorithm. Following compiles with <code>__builtin_clrsb</code> regardless of the <code>WORD</code> type.</p>
  
  <p>Code uses C++11 but runs on an embedded system so I do not have access to most of <code>std::</code> facilities.</p>
  
  <pre><code>#if !defined(WORD)
    #define WORD int
  #endif
  
  template&lt;size_t S, typename word = WORD&gt;
  class my_class {
    ...
    ...
    ...
  
    size_t do_stuff(){
  #if WORD == int &amp;&amp; defined(__builtin_clrsb)
      //compile with  __builtin_clrsb
  #else
     //comple with slow method
  #endif
    }
  };
  </code></pre>