Reputation: 7491
I'm trying to use clang++ or g++ to compile c++11 code by default, which means I want to omit "-std=c++11" flag when calling g++. Is there a clean way to do this?
g++ source.cc
instead of g++ -std=c++11 source.cc
Thanks!
Upvotes: 1
Views: 518
Reputation: 17521
You got some options:
use an bash alias:
alias g++="g++ -std=c++11"
alias clang++="clang++ -std=c++11"
Upvotes: 1