c++11bjamboost-build

Change boost.build jamfile for C++11 support?


I have been using boost.build or b2 for building a project. I am trying to add C++11 contructs like auto and begin but the standard invokation b2 release in the directory with the Jamfile does not recognize these.


Solution

  • Added the following in Jamroot

     <toolset>gcc:<cxxflags>-std=gnu++0x
     <toolset>clang:<cxxflags>-std=c++11
    

    Seems to be working