Boost logo

Boost Users :

Subject: Re: [Boost-users] [Proto] callable_context
From: Hossein Haeri (powerprogman_at_[hidden])
Date: 2011-01-04 08:10:47


Hi Erik,

>   struct add_one_ {
>     typedef int result_type;
>     int operator()(int i) const {
>       return i + 1;
>     }
>   };
>
>   proto::terminal<add_one_>::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


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