
30 Mar
2012
30 Mar
'12
5:19 p.m.
Hi, I just tried to use boost::lambda to prevent from creating an extra Functor class just for one call. This is the code I tried: std::deque<LightningSlice>::const_iterator l = std::find_if( m_lightnings.begin(), m_lightnings.end(), boost::lambda::_1.timeslice().contains(time_) ); with typedef std::deque<LightningSlice> LightningQueue; LightningQueue m_lightnings; //!< The lightnings in timeslices const boost::posix_time::time_period& LightningSlice::timeslice() const { return this->m_period; } Then I get the error: ../LightningIndex.cpp:38: error: 'const struct boost::lambda::lambda_functor<boost::lambda::placeholder<1> >' has no member named 'timeslice' What did I wrong? Thanks, Sven