Checking the C++ version on my laptop
C++ version (Or usually called c++ standard) is different than compiler version.
g++
is your compiler, and your current version is g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
You can use different command to compile your program using different C++ version.
g++ -std=c++11 yourFile .....g++ -std=c++14 yourFile .....
As mentioned in the comments, this version of compiler may not support c++17 features yet