Robert Ramey wrote:
When I run tests on my local system with gcc or clang I use the compile time switch -std=c++03 or -std=c++11 on my bjam command line which gets passed on to the gcc/clang command line.
This isn't very convenient, because you can't run the 03 and 11 tests at the same time (and they go into the same directory). What I use is this (in user-config.jam): import feature ; import toolset ; using gcc ; feature.subfeature toolset gcc : std : cxx0x cxx11 cxx1y cxx14 : optional composite propagated ; feature.compose toolset-gcc:stdcxx0x : <cxxflags>-std=c++0x ; feature.compose toolset-gcc:stdcxx11 : <cxxflags>-std=c++11 ; feature.compose toolset-gcc:stdcxx1y : <cxxflags>-std=c++1y ; feature.compose toolset-gcc:stdcxx14 : <cxxflags>-std=c++14 ; using clang : : : <cxxflags>-Wno-variadic-macros <cxxflags>-Wno-c99-extensions ; feature.subfeature toolset clang : std : cxx0x cxx11 cxx1y cxx14 : optional composite propagated ; feature.compose toolset-clang:stdcxx0x : <cxxflags>-std=c++0x ; feature.compose toolset-clang:stdcxx11 : <cxxflags>-std=c++11 ; feature.compose toolset-clang:stdcxx1y : <cxxflags>-std=c++1y ; feature.compose toolset-clang:stdcxx14 : <cxxflags>-std=c++14 ; This allows me to run b2 toolset=gcc,gcc-cxx11,clang,clang-cxx11 for example. -std=c++03 is, I believe, the default, but you can add it to the above if you like.