concurrent_deferred_rc icon indicating copy to clipboard operation
concurrent_deferred_rc copied to clipboard

Dynamic cast

Open mix359 opened this issue 2 years ago • 1 comments

Hi to all,

first of all, thanks for the hard work and the talk @DanielLiamAnderson!

I’m considering using this library in one of my projects that involves multithreading and real-time audio so it would fit perfectly.

Looking around into the library I can’t find any reference to a way to dynamic cast a pointed Base type T into his Derived type and vice versa. Something like the dynamic_pointer_cast<>() for the std library. There’s any way to do that? Or it should be implemented?

Thanks again Cheers Daniele

mix359 avatar May 31 '23 08:05 mix359

Hey,

We do not currently have this feature implemented. It would be good to have. However, it is not completely clear to me how to actually support alias / base class pointers without unavoidable performance overhead. If you have any ideas, that would be great! Otherwise, its something that I plan to get to eventually, but not in the immediate future.

DanielLiamAnderson avatar Jun 02 '23 21:06 DanielLiamAnderson