
4 Jan
2011
4 Jan
'11
1:10 p.m.
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? TIA, --Hossein