Is there a side effect in doing this:
C code:
struct foo { int k; }; int ret_foo(const struct foo* f){ return f.k; }
C++ c
It will work, and portably BUT you cannot use any virtual functions (which includes destructors).
I would recommend that instead of doing this you have Bar contain a Foo.
class Bar { private: Foo mFoo; };