[Bind] Function arithmetic (sample impl inside)

Hi, It's my first message here, so please excuse possible mistakes. I found that Boost.Bind offers logical operators but no arithmetical operators. Looking into boost/bind/bind.hpp, and using "logical_not" impl, I wrote the following naive patch against version 1.40. It is certainly not as robust as Boost exspects, it is quickly tested, but it seems to do the job, as you can see in the test. Please use attached documents as you see fit. Regards, Ivan. PS: attached main.cpp is compiled with g++ 4.4.1, -std=c++0x, "my" bind.hpp in same directory, and boost 1.40 in include path.

ivan.lelann@free.fr a écrit :
Hi,
It's my first message here, so please excuse possible mistakes.
I found that Boost.Bind offers logical operators but no arithmetical operators. Looking into boost/bind/bind.hpp, and using "logical_not" impl, I wrote the following naive patch against version 1.40. It is certainly not as robust as Boost exspects, it is quickly tested, but it seems to do the job, as you can see in the test.
That kind of functionality is already provided by Boost.Lambda or Boost.Phoenix.
participants (2)
-
ivan.lelann@free.fr
-
Mathias Gaunard