I\'m using g++ 4.8.4 on Ubuntu 14.04 LTS. When trying to compile with \'-std=c++14\', I get this error:
g++: error unrecognized command line option \'-std=c+
G++ does support C++14 both via -std=c++14 and -std=c++1y. The latter was the common name for the standard before it was known in which year it would be released. In older versions (including yours) only the latter is accepted as the release year wasn't known yet when those versions were released.
I used "sudo apt-get install g++" which should automatically retrieve the latest version, is that correct?
It installs the latest version available in the Ubuntu repositories, not the latest version that exists.
The latest GCC version is 5.2.