
21 Feb
2006
21 Feb
'06
11:11 p.m.
Meryl wrote:
My case is using a vector of a pointer of a Class say 'A' which that class's constructor is private.
The following is working for me: #include <iostream> #include <vector> #include <algorithm> #include <boost/bind.hpp> #include <boost/lambda/lambda.hpp> #include <boost/lambda/bind.hpp> namespace lambda = boost::lambda; struct A { private: A(); }; void dummy(A const& c) { } int main() { std::vector<A*> v; std::for_each ( v.begin(), v.end(), bind ( &dummy, *lambda::_1 ) ); } Do you have a test case? Jens