Boost logo

Boost Users :

From: Kevin Wheatley (hxpro_at_[hidden])
Date: 2005-03-17 04:59:40


David Abrahams wrote:
> And unless Boost.Lambda has been updated since I looked, there are
> some nice things that Boost.Bind handles automatically, like calling
> through smart pointers, that aren't quite so easy with Boost.Lambda.

I tried recently to use containers of smart pointers
(boost::shared_ptr) and ran into a real mess of error messages (VC++
7.1), even though I was doing a 'simple' std::find_if() with a _1 ==
value test.

When I had simple pointers Boost.Lambda worked nice and cleanly, but
switching to shared_ptr, was almost impossible to work out what was
going on, I simply switched to a few composed boost::bind()s and it
worked first time, so I have to agree here that Boost.Bind wins out on
this simple use, even though it looses the nice syntax of
Boost.Lambda.

Subsequently, the containers now contain std::pair's to shared_ptrs,
so I have even more composition going on, which for a one off
'function' is getting messy, with Lambda it should be much simpler so
I'd certainly like to know if I missed something with this.

Kevin

-- 
| Kevin Wheatley, Cinesite (Europe) Ltd | Nobody thinks this      |
| Senior Technology                     | My employer for certain |
| And Network Systems Architect         | Not even myself         |

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