Boost Users :
From: David A. Greene (greened_at_[hidden])
Date: 2006-01-25 12:43:13
Jens Theisen wrote:
> It's quite obvious, if you think of it: The compiler would have to insert
> all possibilities for "Type" and include all those in the overload
> resolution if you would want to make the language work this way.
Ok, I see now. I keep forgetting about that pesky possibility of
Handle specializations. :-/
>>What's going on here? Is there a way to make this work without
>>having to explicitly specify the type to print_handle?
> Why is there a need? Presumably you're potential surrogate for shared_ptr
> will also support operator *, and that's all you use in your function.
Why is there a need to do what? I'm not following you here. I've
gone through and specified Type everywhere in my application. It's
ugly but it works. Would the upcoming template typedef feature
avoid the need to specify Type in the call?
typedef boost::shared_ptr<Base> Handle<Base>;
void print_handle(Handle<Type> ptr);
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net