ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
Newbie question: using count with a container of boost::shared_ptr
by beatlebum1967 other posts by this author
Mar 15 2002 8:28PM messages near this date
Re: [boost] Re: Design for a file system library | Re: [boost] Newbie question: using count with a container of boost::shared_ptr
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.

TIA

Beatle.
Thread:
beatlebum1967
Peter Dimov

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved