Boost logo

Boost Users :

From: Jeff Garland (jeff_at_[hidden])
Date: 2007-05-24 23:10:56


Scott Ribe wrote:
> I have an application that depends pretty heavily on Loki::Functor,
> including some extensions/fixes I've made. That works great.
>
> But I want to use smart pointers more extensively (in particular I have a
> need for weak references), and so before I go further with advanced template
> use, I'd like to switch to Boost, since it's being actively developed.
>
> Can anybody point me to a reference comparing Loki's Functor's to Boost's
> function wrappers? I'm ready to dive into "Beyond the C++ Standard Library",
> but first I'd like to know if there's anything like a guide for moving my
> current code. (I only use other parts of Loki very lightly, BTW.)

I haven't seen one.

> In addition to figuring out the straight substitution of one library for the
> other, I have to cope with the modifications I've made to Functor:
>
> - they can be "null" in the sense of not being bound to a function call and
> throwing an exception if called (so that they can be embedded in a class and
> assigned a value later)
>
> - there are initialization forms, and corresponding macros, that record the
> file & line where a functor is created, and log invocations
>
> - they can wrap method calls to Objective-C objects
>
> Heh, the last one reveals a bit about the platform I'm developing for ;-)

Well obviously you would be looking at Boost.function, but maybe it would be
would be easier to simply tie Loki functors and boost smart_ptrs?

HTH,

Jeff


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