K
Kai Wu
Hello,
Sometimes it is desired to assert an object as boolean value, e.g.
class A{
};
.......
A a;
while(a=next()){
.......
}
i have learnt that the operator !() could be overloaded to simulate the
bahaviour,
nevertheless in various situations it makes more sense to assert an object
directly
(like a pointer does), using !() make it a bit awkward ...
Br,Kai
Sometimes it is desired to assert an object as boolean value, e.g.
class A{
};
.......
A a;
while(a=next()){
.......
}
i have learnt that the operator !() could be overloaded to simulate the
bahaviour,
nevertheless in various situations it makes more sense to assert an object
directly
(like a pointer does), using !() make it a bit awkward ...
Br,Kai