0

Is it possible to enable C++14 in Netbeans for both the IDE and the compiler ?

  • I can tell the IDE to use C++11 by setting C++11 in the C++ Standard option of the C++ compiler category.
  • I can tell the compiler to use C++14 by adding -std=c++14 in the Additional Options of the same category.

I see two problems :

  • If the IDE is not C++14 compliant, the code assistance could be wrong for uses of compliant C++14 that do not comply with C++11 standard.
  • The compiler is given both -std=c++11 and -std=c++14 flags. By my tests, I can see that the relevant one is the last one on the command line. Sadly, the IDE puts the Additional Options arguments before the C++ Standard argument, on the compiler command line.

I'm using Netbeans 8.0.2. A consistent solution, if any, avoiding to upgrade to a newer version is preferred. I'm using gcc 4.9.2.

As far as I understand their answers, these related questions do not answer mine :

Community
  • 1
  • 1
SR_
  • 874
  • 13
  • 31
  • 1
    Source: http://stackoverflow.com/questions/31965413/compile-c14-code-with-g - This statement: So up till 4.9.3 you had to use -std=c++1y while the gcc 5.2 options say: ‘c++14’ ‘c++1y’ The 2014 ISO C++ standard plus amendments. The name ‘c++1y’ is deprecated. –  Dec 09 '16 at 10:38
  • @domenkavran using `-std=c++14` or `-std=c++1y` gives the same value to `__cplusplus`. I've checked the gcc source code, and the answer you linked is not correct. The documentation does not list the `c++14` option value, but the value is nevertheless valid. It was done on purpose according to https://gcc.gnu.org/ml/gcc-patches/2014-03/msg00343.html – SR_ Dec 09 '16 at 11:24

1 Answers1

1

No way has been found. We switched to Netbeans 8.2 which has support for C++14.

SR_
  • 874
  • 13
  • 31