$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] template typedef?
From: Roland Bock (rbock_at_[hidden])
Date: 2010-03-26 04:09:21
Rutger ter Borg wrote:
> Roland Bock wrote:
>
>> Hi,
>>
>> I wonder if there is some easy way to express the following incorrect
>> code in a correct way?
>>
>> typedef template<class T> boost::function<void(const T&)> foo_function;
>>
>> template<> foo_function<int> my_foo = bind(example_function);
>>
>
> Something like
>
> template< typename T >
> struct my_function {
> typedef boost::function< void( constT& ) > type;
> };
>
> my_function<int>::type my_foo = bind( example_function );
>
> ?
>
> Cheers,
>
> Rutger
Great! That's it :-)
Thanks and regards,
Roland