From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-01-28 07:29:05
From: "Yitzhak Sapir" <ysapir_at_[hidden]>
> Hi. I would like to make a request as a user: Can all the
> functions/classes in the subject line (and perhaps others) be defined
> with a macro BOOST_BIND_INLINE or BOOST_FUNCTIONAL_INLINE, etc. Then at
> the top of the headers define the macro as either
> #ifndef BOOST_BIND_INLINE
> #define BOOST_BIND_INLINE inline
> Which defines ptr as const in respect to the class. I'm not sure, but
> I'd guess this would help it optimize...
No, there is usually no need for "inline" here; it's implied in in-class
member functions, and in general what counts is whether the function is
visible to the compiler, not whether it has "inline" or not. With MSVC, you
should try -Ob2 to let the compiler inline whatever it wants.
> Another issue with regards to bind is that when I use the bind in
> several statically linked libs, I get multiple definition errors, which
> I solved by going and making the _1 - _9 externs and defining them in my
> own bind.cpp.
_Ns are defined in an unnamed namespace, so there should be no conflicts; I
don't know why this happens in your case, perhaps you are using the same
source file in different static libraries and the compiler picks the same
"unique" name for the unnamed namespace?
> Could they be macros?
> I actually wouldn't mind it if
> they were boost::arg<1>() etc.
Yes, this is something that I'm considering.
> What about regarding bind's ability to get void-returning functions on
> MSVC? Is that being worked on?
Thanks to Dave Abrahams, bind now works with void returning functions on
MSVC. Unfortunately this feature is disabled in 1.26.0 (this version fails
with internal compiler error on MSVC 6 w/ debug info on) but the newest
version from CVS works (be sure to update the bind/ subdirectory as well.)
-- Peter Dimov Multi Media Ltd.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk