From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2005-06-18 20:13:36
David Abrahams wrote:
> 1. Proof it
It has been applied to Boost.Lambda and to boost:mem_fn (which is a part of Bind).
I'll attach the results to the end of this post. An archive containing the
results, all refactored code and a diff for Boost.Lambda (to easily spot the
changes) has been uploaded to the vault:
> 2. Post updated docs that include the proposed naming changes
> 3. Change the code.
> But I'm not too particular about it. I think the proof should come
> first because I'd happily accept assurances in place of steps 2 and 3
> happening before the review period ends.
The docs will be revised. This includes clarification of all the spots that have
caused confusion or have been makred as improvable by the reviewers. This also
includes inline examples and adding some kind of (a) simple tutorial(s).
Const/volatile-qualification of member function pointers will be handled through
the class type.
The interface will be put in a sub namespace and the names will be shortened.
Portability and test suite will be extended.
~/boost $ wc -l mem_fn.hpp mem_fn/data_member_adaptor.hpp mem_fn/functor_preprocessed.hpp
466 mem_fn/functor_preprocessed.hpp (#1)
The file functor.hpp was not counted because it is only used to generate
functor_preprocessed.hpp with Boost.Preprocessor.
~/boost $ wc -l mem_fn.bak/*
103 mem_fn.bak/mem_fn_cc.hpp (#2)
934 mem_fn.bak/mem_fn_template.hpp (#2) (#1)
130 mem_fn.bak/mem_fn_vw.hpp (#2)
(#1) times 2 for BOOST_NO_VOID_RETURNS
(#2) times the number of enabled calling conventions
~/boost $ wc -l lambda/* lambda/detail/*
wc: lambda/CVS: Invalid request code
~/boost $ wc -l lambda.bak/* lambda.bak/detail/*
wc: lambda.bak/CVS: Invalid request code
Compilers tested with: MSVC 7.1, GCC 3.4
All Lambda tests pass
(Lambda would probably even work for any calling convention if TypeTraits
Bind tests for mem_fn pass (*)
When properly configured all non-standard calling convention tests pass
(MSVC only, members can not have custom calling conventions with GCC<4
because of a compiler bug).
Bind as a whole does not pass because it accesses implementation details of
the old mem_fn version. It was not changed because of the limitied time.
(*) mem_fn_eq_test does not pass for MSVC - the code involved looks extremely
trivial and compare operators haven't changed - no idea what's up there - not
sure it passed before the changes.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk