Boost logo

Boost :

From: beatlebum1967 (beatlebum1967_at_[hidden])
Date: 2002-03-15 15:28:25

Thanks to this group I have figured out how to use boost::bind in
conjunction with for_each to call a member function for each pointer
in a container. Now I would like to use a similar idiom to sum the
value of a member given a container of boost::shared_ptrs e.g.

class SomeClass
long m_Long;

std::vector<boost::shared_ptr<SomeClass> > LongVec;

Use std::count to sum the values of SomeClass::m_Long in LongVec.



Boost list run by bdawes at, gregod at, cpdaniel at, john at