ところで上のほうにあったスライシングだが、

class Base{ int val1; };
class Derived : public Base { int val2; };

で、

Derived d;
Base b = d; ←これだけだろ。

なんだかご苦労さんって話だよね。