$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] template typedef?
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2010-03-26 03:54:37
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