Ctors are not simulated properly
Opened this issue · 5 comments
Xazax-hun commented
See missing warning here: https://godbolt.org/z/1715PY
mgehre commented
Merry christmas, @Xazax-hun :-)
mgehre commented
I wonder where the cast to const void*
comes from in
| | | | | | | `-ImplicitCastExpr <col:33, col:40> 'const void *' <BitCast>
| | | | | | | `-CXXMemberCallExpr <col:33, col:40> 'int *'
| | | | | | | `-MemberExpr <col:33, col:35> '<bound member function type>' .data 0x5576782dc2d0
| | | | | | | `-DeclRefExpr <col:33> 'std::vector<int, allocator<int> >':'std::vector<int, std::allocator<int> >' lvalue Var 0x5576782bc9a8 'V' 'std::vector<int, allocator<int> >':'std::vector<int, std::allocator<int> >'
Is it because that's the only overload on the operator<<
that is viable here?
Xazax-hun commented
Oh, merry christmas @mgehre :)
Feel free to ignore this for now, I just wanted to note this down so we don't forget dealing with it later. I have no idea where that cast is coming from. I'd also like to know if you manage to figure out :)
mgehre commented
I think it's because const void*
is the only overload that can take pointers, see https://en.cppreference.com/w/cpp/io/basic_ostream/operator_ltlt
Xazax-hun commented
Oh, indeed. I somehow skipped the rest of the text after the dump. This makes sense to me.