What is this strange conditional operator syntax?

Viewed 334

I recently saw the following in the codebase:

bool bRes = (a < b) ? a=b, true : false;

If a < b, then a=b is executed and bRes is true. What exactly is going on here? The docs for conditional operator don't mention anything about chaining expressions.

edit: to be clear I get the conditional operator part, it's the a=b, true as a single expression that confused me.

2 Answers
Related