title: C++ Complex library compile error
body: <p>Here is my code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;iomanip&gt;
  #include &lt;complex&gt;
  #include &lt;cmath&gt;
  
  int main()
  {
  
  using namespace std::complex_literals;
  
  std::cout&lt;&lt; std::fixed&lt;&lt;std::setprecision(1);
  
  std::complex&lt;double&gt; z1= 1i *1i;   //imaginary unit squared
  std::cout&lt;&lt;"i * i= " &lt;&lt;z1 &lt;&lt;'\n';
  
  std::complex&lt;double&gt; z2=std::pow(1i, 2); //imaginary unit squared
  std::cout &lt;&lt;"pow(i,2) =" &lt;&lt;z2 &lt;&lt;'\n';
  
  
  }
  </code></pre>
  
  <p>I compile with gcc hello.cpp -lstdc++ -o hello.o</p>
  
  <p>Basically it won't let me double the powers of a complex number when i do std::complex z2=std::pow(1i, 2);..</p>
  
  <p>I get the following error </p>
  
  <p>error: no matching function for call to 'pow(<strong>complex</strong> int, int)'
   std::complex z2=std::pow(1i, 2);</p>
  
  <p>However, if i remove the complex number and do std::complex z2=std::pow(2, 2);</p>
  
  <p>it returns 4, the correct answer..</p>
  
  <p>There are many more lines of compile errors, but i made it brief</p>