|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-11-01 08:25:27
From: "David Abrahams" <dave_at_[hidden]>
> Hi,
>
> I'm currently trying to port Boost.Bind to work on Sun compilers, and
> I'm finding the structure of the code extremely difficult. Several
> factors contribute, including:
>
> 1. lack of comments
>
> 2. the use of cryptic names (which I presume are designed to help
> avoid symbol-length limitations)
>
> 3. The use of preprocessor macros not defined in the same file
> where they're used. Not a bad thing in itself, but it adds up...
The code started out pretty readable, but slowly evolved into its current
state, despite my efforts to keep it sensible. :-)
The main reasons for the complexity are (1) support for different calling
conventions, and (2) void returns workaround.
You might find older versions of bind.hpp much more easier to
navigate/understand.
None of the versions worked on Sun, however, IIRC. At one time the compiler
started to compile and run bind_test.cpp, but real world code still didn't
work.
mem_fn_test, on the other hand, worked. Did it break?
> If somebody (Peter) could write a short guide to the implementation it
> might make things go much more smoothly. In particular it seems to be
> having trouble dealing with mem_fn(some-data-member-pointer). I have
> so far been unable to track down where member data pointers are
> distinguished from member function pointers!
Member pointers have a separate overload at mem_fn.hpp(320). Member function
pointer overloads are in mem_fn_cc.hpp.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk