|
Boost Users : |
Subject: [Boost-users] how to use boost.phoenix with std:for_each?
From: Bruce Laing (bruce.laing_at_[hidden])
Date: 2009-04-22 18:36:33
Hi, I would like to do something like this:
struct a_name { std::string name; };
a_name names[] = { std::string("one"), std::string("two") };
std::for_each( &names[0], &names[1],
if_(1)
[
std::cout << arg1.name
]
);
but VC8 complains "error C2039: 'name' : is not a member of
'boost::phoenix::actor<Eval>'"
Can anyone tell me what I'm doing wrong here?
Thanks for your insights,
- Bruce
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net