But - alas! - this performs two modifications of std::cout in a single bitwise or expression (|). Because the operands to bitwise or (|) are evaluated in an unspecified order, this is officially undefined behaviour. See how codepad.org executes it.

So unfortunately we have to find a way to ensure that the first operand is executed before the second. That inevitably means evaluating the first operand separately, which unfortunately requires a variable.

However, all is not lost! Here is a way that takes us well into the realm of obfuscation: