Re: [boost] Request:default constructible bind() result?
by Peter Dimov other posts by this author
Jun 8 2002 6:14PM messages near this date
[boost] Request:default constructible bind() result?
|
Re: [boost] Request:default constructible bind() result?
From: "David Abrahams" <david.abrahams@[...].com>
> I think we have a bug in the iterator_adaptor documentation. Specifically,
> this example: www.boost.org/libs/utility/iterator_adaptors.htm#example
puts
> the result of calling std::bind1st inside an iterator_adaptor. One
standard
> library implementation tried to default-construct one of these
> iterator_adaptors and we discovered that std::binder1st can't be
> default-constructed. I'd like to replace that part of the example with the
> result of calling boost::bind() instead. I think it would be relatively
> harmless to allow the result type of bind() to be default-constructed,
> because nobody's going to name it anyway.
It's possible to make the result type of bind(f, a, b, ...)
default-construct[ia]ble provided that f, a, b have a default constructor.
reference_wrapper, for instance, doesn't have one.
I don't know. Doesn't seem the right way to fix the problem, but I've no
real objections, either.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
David Abrahams
Peter Dimov
Peter Dimov
|