meta.hpp icon indicating copy to clipboard operation
meta.hpp copied to clipboard

How to support std::shared_ptr for upcast

Open gxw8202 opened this issue 7 months ago • 6 comments

for example, struct A{} struct B:A{} class test { std::shared_ptr<B> calc() { return std::make_shared<B>(); }

how to upcast the result of calc method as std::shared_ptr<A> by reflection.

gxw8202 avatar Jul 09 '24 21:07 gxw8202