Boost logo

Boost :

Subject: [boost] function_traits and functors
From: Michael Marcin (mike.marcin_at_[hidden])
Date: 2008-09-22 15:04:44


Is it possible to use function_traits to decompose functors?
Specifically is this supposed to work?

void test_helper( int a )
{
}

template< class Handler >
void test( Handler h )
{
   typedef typename boost::function_traits<Handler>::arg1_type ArgType;
}

int main()
{
   test( boost::bind(&test_helper,_1) );
}

Thanks,

-- 
Michael Marcin

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk