how to cast c++ smart pointer up and down
- by user217428
two clients communicate to each other on top of a message layer
in the message body, I need include a field pointing to any data type
From client A, I send the field as a shared_ptr to the message layer.
I define this field as a shared_ptr in the message layer.
But how can I convert this field back to shared_ptr in client B?
Or should I define shared_ptr in message layer as something else?
Thanks