|
Boost Users : |
Subject: [Boost-users] : Re: How to use the "type" member template pattern for using result_of?
From: Jesse Perla (jesseperla_at_[hidden])
Date: 2009-08-28 13:23:31
Thanks to all,
Now I was playing around with Phoenix on my binding problem here as well
(which is part of the reason for my confusion)... am I right to think that
phoenix has a "result" template incompatible with result_of?
The following seems to work when using Phoenix lazy functions, etc., but the
standard result template did not.
struct test_function_impl
{
//For phoenix... not sure if necessary for
template<typename Arg1, typename Arg2>
struct result {
//typedef typename Arg1::value_type type;
};
template<typename Vector, typename IntT>
typename Vector::value_type //The type in the vector... can be a double
or AD type
operator()(const Vector& x, IntT y) const{
return x[0] * x[0] + y;
}
};
Thanks,
Jesse
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