title: c++11 enable_if error
body: <p>I saw the following example of enable_if for C++11:</p>
  
  <pre><code>struct is_64_bit
  {
      static const bool value = sizeof(void*) == 8;
  };
  
  enable_if&lt;is_64_bit::value, void&gt;::type
  my_memcpy(void* target, const void* source, size_t n)
  {
      cout &lt;&lt; "64 bit memcpy" &lt;&lt; endl;
  }
  
  enable_if&lt;!is_64_bit::value, void&gt;::type
  my_memcpy(void* target, const void* source, size_t n)
  {
      cout &lt;&lt; "32 bit memcpy" &lt;&lt; endl;
  }
  </code></pre>
  
  <p>As I understand, depending on the system architecture, the "my_memcpy" function will be available either for 32 or 64 bit versions. But I'm getting the following error at compilation :</p>
  
  <pre><code>error: ‘type’ in ‘struct std::enable_if&lt;false, void&gt;’ does not name a type
  </code></pre>
  
  <p>I'm a bit confused because I thought only the 32 version should be available (I'm using Linux Fedora 32 bits).</p>
  
  <p>Maybe is something wrong with this example? or Am I missing something?</p>
  
  <p>Thanks.   </p>