Tried the following example compiled with g++ -std=gnu++0x t1.cpp and g++ -std=c++0x t1.cpp but both of these result in the example aborting.
g++ -std=gnu++0x t1.cpp
g++ -std=c++0x t1.cpp
You need to link to run time library