title: How to compile C++ with C++11 support in Mac Terminal
body: <p>I wanted to compile C++11 source code within Mac Terminal but failed. I tried <code>g++ -std=c++11</code>, <code>g++ -std=c++0x</code>, <code>g++ -std=gnu++11</code> and <code>g++ -std=gnu++0x</code> but nothing worked. Terminal always read <code>unrecognized command line option</code>. However, <code>g++ -std=gnu</code> and things like that worked fine (of course C++11 source code could not pass).</p>
  
  <p>Which option should I use to turn on C++11 support?</p>
  
  <p>By the way, the command line tool I'm using is installed within Xcode, and I'm pretty sure that they are up-to-date.</p>