????Kernel Panic ?????  C++11 ?е? 5 ???????????????????????????????Unique ?????static_assert??Lambdas ??????
????Auto Type Deduction ??????????
????auto ????????????????? C++ ?????????????????
????std::string something = somethingthatreturnsastring.getString();
????auto something = somethingthatreturnsastring.getString();
????Auto ??????????????????something???????????????ó???????? string ????????????? auto ??????????????????????滻?????????????????????á?
????for(std::vector<T>::iterator it = x.begin(); it != x.end(); i++)
????{
????it->something();
????}
????????????????д???
????for(auto it = x.begin(); it != x.end(); i++)
????{
????it->something();
????}
??????? ??????????????
????Strongly Typed Enums ????????
????????????????Ч??????????????????????????????????? bug?????汾?? C++ ?У?????????????????????趨???????????????磬??????????????????? None??????????????????????????????????????????????????????????????????????????????·????????????????????//myEnum ::All ?? myEnum::All?????????????
????enum class myEnum {None?? One?? All};
????myEnum o = myEnum ::All;
????auto p = myEnum::All;
????// ?????Ч
????Lambdas ????
????Lambda ?????????????????????????????in-place function???????“????????????”?????????????????????????????壩??????????????for ???????????????????????????????????????Σ???????б???????????????????????Lambda ??????????? C++ ??????????????“????????????”??????????????????????????????????????????????ó????????Lambda ???????????????????????
????[]() { }
???????????п?????????????????????
????[]() mutable -> T { }
????????[]??????б??()??????б??{}???????
????Capture List ?????б?
?????????б????????????????????? Lambda ???????????????????????????????????Щ??
??????????[x]
??????????? [&x]
?????????Χ??????????????? [&]
?????3????????????????
????????????????????????????????????????? [x?? &y]
????Argument List ?????б?
?????????б?? C++ ??????????б?????????
????Function Body ??????
??????????????? Lambda ?????????????????е????
????Return Type Deduction
????????????
??????? Lambda ???????????????????????????????????????????????????????decltype(return_statement)
??????? Labmda
?????????? Lambda ?????????? mutable?????磺[]() mutable{ }??????????????????????????????????????????Щ?????????????
???????????????
????int main()
????{
????char s[]="Hello World!";
????int Uppercase = 0;
????//lambda??????????????
????for_each(s?? s+sizeof(s)?? [&Uppercase] (char c) {
????if (isupper(c))
????Uppercase++;
????});
????cout<< Uppercase<<" uppercase letters in: "<< s<<endl;
????}