Compiler Support

Let's look at the compiler support for the updates from C++17 with respect to templates.

Feature GCC Clang MSVC
Template argument deduction for class templates 7.0/8.0[^gccimprov] 5.0 VS 2017 15.7
Deduction Guides in the Standard Library 8.0[^gccguides] 7.0/in progress[^clangdeductionprogress] VS 2017 15.7
Declaring non-type template parameters with auto 7.0 4.0 VS 2017 15.7
Fold expressions 6.0 3.9 VS 2017 15.5
if constexpr 7.0 3.9 VS 2017

[^gccimprov]: Additional improvements for Template Argument Deduction for Class Templates happened in GCC 8.0, P0512R0. [^gccguides]: Deduction Guides are not listed in the status pages of LibSTDC++, so we can assume they were implemented as part of Template argument deduction for class templates. [^clangdeductionprogress]: The status page for LibC++ mentions that <string>, sequence containers, container adaptors and <regex> portions have been implemented so far.

Get hands-on with 1400+ tech skills courses.