Install g++-5 on Ubuntu 14

Any better suggestion than the following?

sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get install g++-5

I’m using CircleCI 1.0. How about with CircleCI 2.0?

Cheers,
Shaun