
Hi there, I would like to boost::function with a templated member
function. Please consider the following code:
struct my_reader
{
my_reader(bool full)
{
if( full )
{
_read_function = &my_reader::read_full<int>;
}
else
{
_read_function = &my_reader::read_partial<int>;
}
}
void read()
{
_read_function(this);
}
private:
template< typename T >
void read_full()
{
std::cout << "reading full image" << std::endl;
}
template< typename T >
void read_partial()
{
std::cout << "reading partial image" << std::endl;
}
boost::function