Boost logo

Boost :

Subject: Re: [boost] What to do about std::binary_function and std::unary_function?
From: Nick Matteo (boost_at_[hidden])
Date: 2016-05-06 15:43:06

On Fri, May 6, 2016 at 4:32 AM, Rainer Deyke <rainerd_at_[hidden]> wrote:
> 3a) Provide boost::binary_function<Arg1, Arg2, Result>, which inherits
> std::binary_function<Arg1, Arg2, Result> if it is available, and
> reimplements std::binary_function otherwise.

This would need some sort of macro to tell us if std::binary_function
is available. I looked into whether any SD-6 feature test macros were
being suggested for this. Last year they were considering either
__cpp_lib_removed_function_objects or

But ultimately they decided not to provide any macros for this in the
current version (23 Feb 2016) at
(The relevant row is N4190, listing _none_.)

The justification was somehow left out of that page, but can be seen

"These library features are removed because superior alternatives to
them were introduced in C++11. Because these alternatives are
superior, there is little motivation to maintain code that uses one of
these obsolescent features when it is available."

So, it seems that Study Group 10 is essentially recommending option 4.

Nick Matteo

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