-
[Dive into C++] Templates, Forwarding Reference, Perfect Forwarding, Data Type Deduction
Templates Template Class with a Specialized Method Template Class with a Templated Method Template Class with a Class Partial Specialization NOTE: Only templated classes may be partially specialized; templated methods must be fully specialized. Variadic Templates, Parameter Pack Solve sum example: Forwarding Reference Perfect Forwarding Data Type Deduction Examples Deduce const: Forwarding reference: References Error…
-
[Dive into C++] Semantics, Smart Pointers
1 Semantics Semantics 3 category: Semantics is an attribute of a data type. 1.1 Value Semantics / Copy Semantics 1.2 Move Semantics 1.3 Reference Semantics / Pointer Semantics 2 Smart Pointers C++11 introduces: They are all containers for a raw pointer. 2.1 unique_ptr 2.2 shared_ptr 2.3 weak_ptr References Error happened.
-
[Dive into C++] lvalue/rvalue, references, const in C++
I have found a really good resource for learning C++ on Youtube: CopperSpice! It has a suitable amount of information: not too much, and not too little. Great!😀👍 I have been reading and writing C++ code extensively for these two years. I like this language: it’s fast, giving developers a great deal of details and…