Boost logo

Boost :

Subject: [boost] boost::bind result type
From: David Sankel (camior_at_[hidden])
Date: 2010-07-19 17:37:01


I'm wondering if there's a way I can generically get the result type of
boost bind.

I'd like to write something along these lines:

template< typename StreamT, typename Sink >
typename boost::result_of< boost::Bind( StreamT, boost::arg<1>, Sink )
>::type
apSink( StreamT t, Sink sk )
{
    return boost::bind( t
                      , _1
                      , sk
                      );
}

I'm not interested in a boost::function solution because I require that uses
apSink's result can be inlined. Any ideas? Perhaps one of these other
bind-like libraries has an answer to this.

Thanks,

David

-- 
David Sankel
Sankel Software
www.sankelsoftware.com
585 617 4748 (Office)

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