Assuming you prepare a Phoenix-friendly function object:
namespace lexical_casts
{
template <typename T> struct to_
{
template <typename/*V*/> struct result { typedef T type; };
template <typename V>
T operator()(V const& v) const { return boost::lexical_cast<T>(v); }
};
boost::phoenix::function<to_<int> > to_int;
}
You can write things like:
BOOST_AUTO(value_of, phx::lambda[ phx::bind(&Foo::Value, arg1) ]);
std::vector<int> ints;
boost::transform(
foolist,
back_inserter(ints),
lexical_casts::to_int(value_of(arg1)));
See it Live On Coliru