Debug Posted June 26, 2012 Share Posted June 26, 2012 I am developing a C++ template library that uses both primitive types and pointer types stored in boost::shared_ptr. I am having a problem with a helper class that is used to pack primitive types into a container class if necessary before being passed into a lower layer of the library. The following shows the basic type that just passes the pointer on, and the implementation for std::string which is one of the primitives.The rr_cast<>() function is an alias to dynamic_pointer_cast. The problem I am having is that for the general case, the template "T" includes the "boost::shared_ptr" prefix because this type may or may not interact with a shared_ptr. The prefix messes up the dynamic_pointer_cast, because it expects just the pointer type. Is there a clean way to work around this? Link to comment Share on other sites More sharing options...
JohnOne Posted June 26, 2012 Share Posted June 26, 2012 I do not know the answer sorry, but if you don't mind I would like to ask you a question. Just out of curiosity, why did you specifically register on an autoit forum to ask a C++ question? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now