Void Smart pointer

22 views
Skip to first unread message

abuchuu

unread,
Aug 30, 2010, 10:02:27 AM8/30/10
to ns-3-users
hello there,

Is it possible to create a void smart pointer so that, it could be
assigned later based on implementation cases ?

Thank you very much!
Dereje (Abuchuu)!!
Message has been deleted

Quincy

unread,
Aug 30, 2010, 11:18:26 PM8/30/10
to ns-3-users
Oops... Sorry I misread "void" to be "null" in my last post (now
removed)...

Not really - Ptr needs the functions Ref() and Unref() in the object
it's pointing to.

Since Ptr doesn't work with arbitrary types, it doesn't make sense for
you to use void pointers either. If you want a Ptr to accept anything
that it can support, you could make it a Ptr<Object> instead.
Reply all
Reply to author
Forward
0 new messages