Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-12-04 08:44:12


From: "Markus Werle" <yg-boost-users_at_[hidden]>
> The code below compiles fine if You return to Value
> semantics and replace "const Vector&" with "Vector".
> But with reference to vector two compilers (Intel-7.0
> and gcc-3.2.1) "throw" with a "reference to reference" error.
>
> How can I achieve what I want here?

[...]

> #include "boost/bind.hpp"
> #include "boost/compose.hpp"

It's simple, don't use compose. :-)

[...]

> function<double (const Vector&)> l =
> compose_f_gx_hx(Adder, h1, h2);

Change to

bind(Adder, bind(h1, _1), bind(h2, _1));


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