always use flag -std=c++11.
correctly place -std=c++11 option.