Why is there no ||= operator in C/C++?

Viewed 2751

Possible Duplicates:
&&= and ||= operators

See title. This question may be expanded to include all logical+assignment operators. To clarify: I am not talking about |= operator.

Another example: &&=

Thanks.

Example:

bool result = false;

// Today
result = result || my_test1();
// Do stuff
result = result || my_test2();

// In my imagination only...
result ||= my_test1();
// Do stuff
result ||= my_test2();
4 Answers
Related