title: Complex type with C linkage in C++11
body: <p>I need to include the header of a C library into my C++11 code. Now, the header provides routines and data structures that involve plenty of <code>double complex</code> all over the place. E.g.,</p>
  
  <pre><code>#include &lt;complex.h&gt;
  //..
  typedef struct parameters
  {
      // ...
      double complex Vud;
  } parameters;
  // ...
  double complex polylog(int n, int m, double x);
  </code></pre>
  
  <p>I bring this file into my C++11 source wrapped in <code>extern "C" { #include "include.h" }</code> (that's the actual filename, believe it or not). And g++ (tried 4.7.3 and 4.8.2) and clang (3.3) go nuts if I have -std=c++11 added.</p>
  
  <p>The millions of lines of g++ errors include plenty of:</p>
  
  <pre><code>include/g++-v4/cmath:98:3: error: template with C linkage
  </code></pre>
  
  <p>And clang gives:</p>
  
  <pre><code>cmath:84:3: error: declaration conflicts with target of using declaration already in scope
    abs(double __x)
    ^
  /usr/include/stdlib.h:773:12: note: target of using declaration
  extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
             ^
  /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/include/g++-v4/cstdlib:245:14: note: using declaration
    using std::abs;
               ^
  </code></pre>
  
  <p>I am not sure how to get around this. What is the correct way to do this? Clearly these must be inter-operable, but I do not know the trick.</p>