From the GCC website:
Because the final ISO C++14 standard was only recently published, GCC's support is experimental
To enable C++14 support, add the command-line parameter -std=c++14 to
your g++ command line. Or, to enable GNU extensions in addition to
C++14 extensions, add -std=gnu++14.
In your case, have you tried the
-std=gnu14 option to see it that works?
C++14 features became available from GCC 4.8, so in your case you should have some support for this.
From the g++ man page, I found this:
The next revision of the ISO C++ standard, tentatively planned for 2014. Support is highly experimental, and will almost
certainly change in incompatible ways in future releases.
GNU dialect of -std=c++1y. Support is highly experimental, and will almost certainly change in incompatible ways in
So it looks like the option to use may not be
c++1y instead, give it a try.
ps: I use a newer version than yours and these are the options I have for
$ g++ --version
g++ (GCC) 4.9.1 20140922 (Red Hat 4.9.1-10)