title: function is not an element of std
body: <p>I got some quite strange errors compiling code under gcc. It tells me that <code>std::function</code> does not exist.</p>
  
  <p>I can recreate the error with the following code:</p>
  
  <pre><code>#include &lt;functional&gt;
  #include &lt;stdio.h&gt;
  
  void test(){ printf ("test"); }
  
  int main() {
      std::function&lt;void()&gt; f;
      f = test;
      f();
  }
  </code></pre>
  
  <p>If I run gcc (from cygwin): (my error message was German, so i translated it. It may be sound different on a English gcc)</p>
  
  <pre><code>$ gcc test.cpp
  test.cpp: in function "int main(): 
  test.cpp:7:3: Error: "function" is not an element of "std"« 
  test.cpp:7:25: Error: "f" was not defined in this scope
  </code></pre>
  
  <p>With MSVC it compiled successfully. 
  Please tell me what I am doing wrong in my code. </p>
  
  <p>Johannes</p>