Skip to content

Knowledgebase Programming: Compiler C feature support

oktal3700 edited this page Oct 31, 2023 · 4 revisions
C++17 feature VS 2019 16.11; cl.exe 19.29.30147 VS 2022 17.0; cl.exe 19.30.30704 Ubuntu 20.04 GCC 9.3 Xcode 13.0; clang 13.0 (LLVM 12)
Nested namespace definition
Fold expressions
Pack expansion in ''using''
Lambda capture ''*this''
''constexpr'' lambdas
Range ''for'' heterogeneous iterators
''fallthrough'' attribute
''if constexpr''
''if''-init and ''switch''-init
Structured bindings
Class template argument deduction
Inline variables
''auto'' non-type template parameters
Guaranteed copy elision
''std::void_t''
''std::bool_constant''
''std::string_view''
''std::optional''
''std::variant''
''std::any''
''std::invoke''
''std::as_const''
Traits ''_v'' alias variables
C++20 feature VS 2019 16.11; cl.exe 19.29.30147 VS 2022 17.0; cl.exe 19.30.30704 Ubuntu 20.04 GCC 9.3 Xcode 13.0; Apple clang 13.0 (LLVM 12)
NTTP of class type
Concepts ½ ½
Modules ½
Coroutines ½
''consteval''
''constinit''
''constexpr'' containers
''constexpr'' algorithms
''constexpr std::invoke''
Lambdas in unevaluated contexts
Default-ctor stateless lambdas
Pack expansion in init-capture
''<=>''
''using enum''
CTAD for aggregates
More implicit move in ''return''
Atomic ''std::shared_ptr''
''std::remove_cvref''
''std::bind_front''
''std::erase'' ½ ½
''std::lerp''

See also http://en.cppreference.com/w/cpp/compiler_support

Clone this wiki locally