$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Okko Willeboordse (trash_at_[hidden])
Date: 2005-08-29 15:44:47
Thanks,
Then I end up with a constructor that takes any type of data which
can not be distinguished from my other constructors.
Peter Dimov wrote:
> Okko Willeboordse wrote:
> 
> 
>>So I do
>>
>>class some_class
>>{
>>public:
>>   template <class T>
>>   some_class(const boost::function1<T*, short*>& get_member)
> 
> 
> Why not just
> 
>     template<class F> some_class( F f );
> 
> ?
> 
> boost::function<> is useful when you have to capture an arbitrary function 
> object in a fixed type. Since your boost::function<> above is templated on 
> T, it has a variable type, so you can just use the function object argument 
> as-is.