|
Boost Users : |
Subject: Re: [Boost-users] [traits/function_types/generic] Can F be called with{a0, ..., aN}?
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2010-03-03 10:13:50
Jesse Perla wrote:
> Yup. I think it is very useful. Though without getting it to work with
> phoenix
> or std::tr1::bind, I think it have limited appeal. I also would guess
> (though haven't tested) that the trick fails with boost::function as well.
Perhaps this is because
void some_f( int ) {}
boost::bind( &some_f, _1 )( 1, 1, 1, 1, 1 );
compiles and works? But you probably mean that
boost::bind( &some_f, _1 )( "some_other_type" );
doesn't compile, whereas
is_callable< BOOST_TYPEOF( boost::bind( &some_f, _1 ) ),
boost::mpl::vector< std::string > > is true_.
I see. I will check if this indirection can be detected somewhere...
Cheers,
Rutger
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net