
On 1/4/2011 8:10 AM, Hossein Haeri wrote:
Hi Erik,
struct add_one_ { typedef int result_type; int operator()(int i) const { return i + 1; } };
proto::terminal
::type const add_one = {}; This needs me to wrap every function into a function object and then instantiate that function object using an aggregate syntax. This is awkward. I need something automatic for functions.
1 >> add_one >> add_one
I need something which can work with expressions like
1 >> &f >> &g >> &h
where f, g, and h are ordinary functions. Is that also doable in Proto?
No. It's not doable in C++, period. There are no UDTs in the above expression, so no operator overloads are considered. And there are no built-in operators that make that well-formed. -- Eric Niebler BoostPro Computing http://www.boostpro.com