迷茫2017-04-17 13:24:08
It cannot be set directly, but we can save the country through curves
If you are using bash
echo "alias g++='g++ -std=c++11'" >> ~/.bashrc'
source ~/.bashrc
In case of zsh
echo "alias g++='g++ -std=c++11'" >> ~/.zshrc'
source ~/.zshrc
In this way, g++ will come with this parameter, or you can use an alias such as g++11
黄舟2017-04-17 13:24:08
I don’t know how to set it up, but you can write a shell script, hahaha:
#!/bin/sh
clang++ -std=c++11 "$@"