In the first code fragment, you are not assigning to d at all. Assignment (=) operator assigns the rvalue (right hand side) to the lvalue (left hand side). This is very standard syntax.
In the first code fragment, you are not assigning to d at all. Assignment (=) operator assigns the rvalue (right hand side) to the lvalue (left hand side). This is very standard syntax.