Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-08-31 11:02:33

From: "Darin Adler" <darin_at_[hidden]>
> On Friday, August 31, 2001, at 06:17 AM, Peter Dimov wrote:
> > The circle is now complete. ;-) My original intention to replace
> > {std,boost}::mem_fun has met a strong opposition. I now consider the
> > arguments quite convincing, so I decided to rename mem_fun.
> That's not how I remember it. There wasn't strong opposition to replacing
> boost::mem_fun with yours, as I recall it. The strong opposition was to
> having two separate boost::mem_fun function templates in two different
> boost headers, making it an error to include both headers.

Mark Rodgers:

"Firstly, the name mem_fun has definitely got to change. It
conflicts with the existing mem_fun in boost/functional.hpp.
Of course this begs the question - could the two mem_funs
be amalgamated so that perhaps functional.hpp could just
include mem_fun.hpp? Unfortunately not. The two are
fundamentally different - the existing mem_fun creates an
adaptable unary function object; Peter's function object is
not adaptable and cannot be made to be adaptable."

"I am absolutely opposed to this idea. The order of includes should
not matter. If anything, functional.hpp would include mem_fun.hpp.
However that includes a lot of extra baggage, and also your mem_fun1_t
replacement doesn't use call_traits so I suspect suffers from the
reference-to-reference problem.

Of course that can be fixed, but then we have compiler compatibility
issues, compile time issus and anyway I still have to question the need for
a new mem_fun."

Jens Maurer:

"There's a clash with Boost.Functional. I think that
Boost.Functional's mem_fun has a slightly different purpose
than bind's mem_fun: The former wants to fix up a few
nuisances of std::mem_fun, while the latter tries to
generalize it a lot more. Since the standard and
Boost.Functional was there first, bind's mem_fun must
change its name. What about member_fun?"

Mark Rodgers:

"Or you could just rename it anyway so there is no conflict and we don't
have to worry. Jens suggested member_fun."

Jens Maurer:

"Re-thinking the issue, I'm (only) concerned not to replace the
easy and straight-forward extensions in Boost.Functional) with
the version in bind, which has had far less public exposure."

Rethinking the issue myself, Jens is right.

Peter Dimov
Multi Media Ltd.

Boost list run by bdawes at, gregod at, cpdaniel at, john at