[Bug c++/86908] static_cast(&derivedClassObject)->virtualMehod() calls base version of virtualMethod()

2018-08-21 Thread fro0m.spam at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86908 --- Comment #8 from Kostya Frumkin --- > Either way you need to placement new the original type back again, otherwise > the wrong destructor gets called on scope exit, which adds more undefined > behaviour. There should not be undefined behavior

[Bug c++/86908] static_cast(&derivedClassObject)->virtualMehod() calls base version of virtualMethod()

2018-08-10 Thread fro0m.spam at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86908 --- Comment #5 from Kostya Frumkin --- (In reply to Jonathan Wakely from comment #4) > (In reply to Kostya Frumkin from comment #3) > > Hi, for example msvc2013 calls base class's virtual method when msvc2015 > > calls derived class's virtual met

[Bug c++/86908] static_cast(&derivedClassObject)->virtualMehod() calls base version of virtualMethod()

2018-08-10 Thread fro0m.spam at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86908 Kostya Frumkin changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Version|unknown

[Bug c++/86908] New: static_cast(&derivedClassObject)->virtualMehod() calls base version of virtualMethod()

2018-08-10 Thread fro0m.spam at gmail dot com
Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: fro0m.spam at gmail dot com Target Milestone: --- #include #include #include #include class BaseStrategy{ public: