I'm trying to implement treap class, so I have this code:
void item::insert(item* it) {
if (!this)
this = it;
.....
I can't compile this with GCC:
error: lvalue required as left operand of assignment
I know, I can simply assign all members of it
to this
, but is there another way?