Using -std=c++14 causes error.

Platform Ubuntu 14.04.

Clion 1.2.4

When adding the line 

-std=c++14

I get the error below but not when -std=c++11 is used.

c++: error: unrecognized command line option ‘-std=c++14’

Thanks for any help.

 

5 comments
Comment actions Permalink

Hi Joseph.

Could you please attach  a screenshot via Preferences | Build, Execution, Deployment | Toolchains?

0
Comment actions Permalink

With Ubuntu 14.04 you're probably using gcc-4.8, which predates the c++14 standard. However, you should be able to use c++14 features with '-std=c++1y'

0
Comment actions Permalink

Hi Joseph. 

Do you still have the problem?

0
Comment actions Permalink

Thank you Anna and Werner for your input;   -std=c++1y did the trick.

0

Please sign in to leave a comment.