Lecture 10
struct Node {
...
Node (int data):
data{data}, next{nullptr};
}int f(Node n);
f(4); // works - 4 implicitly converted to Node
Node m{4}; // works fine
Node m = 4; // works - but 4 is not a node, it is an int Destructors
Copy Assignment Operator
Alternative: copy-and-swap idiom
Rvalues and Rvalue references
But
Last updated