lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: [lmi] callback.hpp vs boost::function


From: Vadim Zeitlin
Subject: Re[2]: [lmi] callback.hpp vs boost::function
Date: Mon, 31 Oct 2005 00:02:56 +0100

On Sun, 30 Oct 2005 21:28:44 +0000 Greg Chicares <address@hidden> wrote:

GC> On 2005-10-30 20:52 UTC, Vadim Zeitlin wrote:
GC> > 
GC> >  while fixing this file to compile with g++ 4.0
GC> 
GC> BTW, I'm working on getting a clean compile with g++-3.4.4 now. The
GC> worst problem I've found is described here
GC>   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22207
GC> and can be worked around by specifying '-Wno-uninitialized'. Was that
GC> a problem with 4.0 as well? If not, I'll use the workaround only for
GC> 3.4.4 <= version < 4.0 .

 I think you should use it for 3.4.0 <= version <= 3.4.4 because I don't
get the warning neither wiht 3.4.5 nor 4.0.2. Unfortunately I don't have
3.4.4 any more to test with it.

GC> Have you found many other problems with 4.0 ? Please let me know so
GC> that we can avoid duplicating each others' work. I'm fixing some expm1()
GC> warnings right now. Wendy pointed out a 3.4.4 problem with mpatrol that
GC> I haven't yet looked into.

 I didn't have any other problems.

GC> But if boost::function really does exactly the same thing, then it's
GC> better to use theirs in all those cases.

 boost::function encapsulates any callable object, whether a function,
functor or bind-expression (which makes it also possible to apply it to
methods). It has a very nice syntax (at least if you use a conformant
compiler such as g++ 3 or MSVC 7.1+) and in general I think it's one of the
easiest to use of boost libraries but nevertheless a very useful one.

 Regards,
VZ





reply via email to

[Prev in Thread] Current Thread [Next in Thread]