Skip to content

💡 TL;DR:An overview of the new C++11 features: Variadic Templates, Spaces in Template Expressions, nullptr, auto type deduction, uniform initialization, initializer_list, and more.

Last updated:2026-10-13

C++11 New Features Overview

1.C++11 New Features

vector<list<int> > //ok in each C++ version
vector<list<int>> // before c++ 11 error error: ‘>>’ should be ‘> >’ within a nested template argument list,c++11后可以正常通过
for(decl:col) {
    statement
}

If you define a ctor yourself, the compiler will no longer give you a default ctor. By forcibly adding =default, you can regain and use the default ctor.

Learning material: https://www.bilibili.com/video/av51863195?from=search&seid=3610634846288253061

Comments