Learn how to compile c++ 17 program in Linux ubuntu. C++17 features are available in GCC 5 and later. To compile C++17 program , add the command-line parameter -std=c++1 7or -std=c++1y or -std=c++1z to your g++ command.

Let us try to compile below c++ 17 code

how to compile c++ 17 program in Linux ubuntu

#g++ -std=c++17 main.cpp

ISO C++1z standard is still in development , all available features are experimental. Under Ubuntu based OS all headers are lying inside /usr/include/c++/5/experimental/any

how to compile c++ 17 program in Linux ubuntu

Youtube video tutorial

Ref:
https://gcc.gnu.org/projects/cxx-status.html#cxx1z




Related Contents to follow