1.auto Type deduction
The biggest advantage of auto derivation is that it simplifies code when you have a complex type variable declaration with an initialization expression.
Auto's second advantage is to eliminate the programmer's trouble with some type declarations, or to avoid some errors in type declarations.
The third advantage of auto is that its "adaptive" performance can support generics programming to some extent.
Four terms of use for auto:
1) Function: cannot be a formal parameter
2) struct: cannot be a static type
3) Array: cannot declare an array
4) Template instantiation: cannot be used as a template parameter
2.decltype Derivation Details
1) If E is a cousin expression or a class member access expression without parentheses, then Decltype (e) is the entity named by E;
2) Otherwise, is the type of E is T, if E is a dead value, then Decltype (e) is t&&;
3) Otherwise, the type that is set E is T, if E is an lvalue, then Decltype (e) is t&;
4) Otherwise, the type that is set E is T, then Decltype (e) is t;
Inheritance and redundancy of 3.CV limiters
Decltype can be redundant, but its deduced members cannot inherit const,volatile.
4. Range-based for loop (do it faster and better than For_each)
5. Trace type return (the ability to really release C++11 's generic programming and more convenient use of templates)
Recruit easy to learn, veterans easy to use----C + + (C++11 's learning and finishing---how to reduce the amount of code, enhance the readability of the code)