assign to null evaluates to false
int main() {
//chaining call
Base* b = new IntObj(8);
Base* c = new IntObj(6);
Base* d = new IntObj(9);
b->setNext(c)->setNext(new IntObj(4))->setNext(new IntObj(4))->setNext(new IntObj(4))->setNext(new IntObj(4))->setNext(new IntObj(4));
std::cout << ((b = b->next) ? 1: 3) << std::endl;
//1
std::cout << ((d = d->next) ? 1: 3) << std::endl;
//3
}