class MyClass {
public:
register_callback(int, void*);
}
typedef boost::shared_ptr<MyClass> myClass_p;
class MyOtherClass {
public:
registerItem(std::pair<std::string, myClass_p>insertItem) {
auto foo = insertItem.second;
void *bar = static_cast<void*>(foo);
}
Given the above code why am I getting "static_cast: cannot convert from myClass_p to void *. I thought you could cast any pointer to a void *.