title: Compiling on linux with c++ standard libraries
body: <p>Hi have the following example code:</p>
  
  <p><strong>func.h</strong> - header file for functions</p>
  
  <pre><code>#include &lt;vector&gt;
  #include &lt;tuple&gt;
  using std::vector;
  using std::tuple;
  tuple &lt;double,double&gt; A(vector&lt;int&gt;&amp; n);
  </code></pre>
  
  <p><strong>func.cpp</strong> - function cpp file</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;tuple&gt;
  using namespace std;
  tuple &lt;double,double&gt; A(vector&lt;int&gt;&amp; n)
  {
    double a1=n.size();
    double a2=a1+0.5;
    return make_tuple(a1,a2);
  }
  </code></pre>
  
  <p><strong>main.cpp</strong> - main cpp file</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;tuple&gt;
  #include "func.h"
  using namespace std;
  int main()
  {
     double a1,a2;
     vector&lt;int&gt; n;
     n.push_back(1);
     n.push_back(2);
     tie(a1,a2)=A(n);
     return 0;
  }
  </code></pre>
  
  <p>This compiles well in visual studio.</p>
  
  <p>I have a problem compiling it on Linux (gcc version 4.4.7 20120313 Red Hat 4.4.7-11) with:</p>
  
  <pre><code>g++ -03 -std=c++0x main.cpp func.cpp -lm
  </code></pre>
  
  <p>It does not compile, I get the following errors:</p>
  
  <pre><code>1. In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/array:35,from main.cpp:5:/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/c++0x_warning.h:31:2: error: #error This file requires compiler and library suppcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.
  
  2. ‘std::tuple’ has not been declared
  
  3. expected constructor, destructor, or type conversion before ‘&lt;’ token
  </code></pre>
  
  <p>Any guidance on how to deal with this will be helpful!</p>