Looks like you found the quirk compiler :)
If you change your compiler version to anything other than LLVM 3.0, the output will be int3 & 4.
This prints int3 & 4 to LLVm 3.0, so it seems to be related to the fact that B (3) is a temporary object:
class B { public: explicit B(int i) { std::cout<<"int"<<i; } B(const B& rhs, int i = 0) { std::cout<<"&"<<i; } }; int main(int, char**) { B a(3); B b(a, 4); }
source share