Skip to content

Last updated:2026-10-12

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