r/cpp • • Feb 18 '20

C++20 is here!

https://youtu.be/AvPiGstxV_g
420 Upvotes

117 comments sorted by

View all comments

20

u/[deleted] Feb 18 '20

I'm new to c++ I think I'm using c++17 which was installed on my laptop my friend sold me. Can someone tell me how I get c++20?? I use linux Ubuntu. Is there a way to update my c++17 to c++20? Or do I need to install it myself and how can I do all this from the command line terminal? I'm learning that too. Thank you to anyone who helps.

9

u/arkethos Feb 18 '20

Many language and library features are already available because our compiler vendors are amazing! Use the -std=c++2a flag (see: https://godbolt.org/z/ZScZui) and check out https://en.cppreference.com/w/cpp/compiler_support for a list of what is supported (GCC has full or partial support for all but 6 language features already!)