Can we use Ternary operator in Constraints?

In reply to dave_59:

Dave’s answer is not correct.
Correct constraint is

b == ((a<2) ? 2 : 3);