© { JSL }
92
Copy Assignment?
·
you cannot overload simple assignment
w
a copy is
always
a plain bitwise copy
struct
Pair
{
public static
Pair
operator
=(Pair lhs, Pair rhs)
{
...
}
...
}
struct
Pair
{
...
void
Func(Pair lhs, Pair rhs)
{
lhs = rhs;
...
}
}
you can't do this.
compile time error
simple assignment