@myrrlyn of course.
The rule of thumb with C++ compilers when behavior isn't strictly defined by the language standard is:
- gcc will intentionally do the most obtuse possible thing, to punish you for not reading the spec closely enough (git gud you fucking idiot)
- the compiler backed by big tech will do the thing you expected to have happen, because they don't hate you and also because they need junior engineers to be able to write code