If I extract the value of the bitwise or operation I get the same result no matter the order (as expected).
None of my reference material describes using the "correct" order for stream flags. Is this a compiler quirk (I'm using MinGW under Qt Creator) or a newbie error that I should know better?
there's no difference. x | y evaluates to the same thing as y | x no matter what x and y are. That'd be like saying "5+3 is giving me something different than 3+5"
You must be misinterpretting what is happening in one instance, or you changed something else between tests. What makes you think the file is opening in text mode when you use the former?
Well, it's hard to misinterpret a file being written in plain ASCII when I was expecting binary output, so that definitely wasn't it.
I updated to the latest SDK after my original post and the order of operation now makes no difference - as expected. So, I guess we'll never know if I had made a mistake elsewhere or if it was a bug that's now been fixed.