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
__cpp_lib_removed_deprecated_functionals
(https://www.mail-archive.com/features@isocpp.open-std.org/msg00114.html).

But ultimately they decided not to provide any macros for this in the
current version (23 Feb 2016) at
https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations.
(The relevant row is N4190, listing _none_.)

The justification was somehow left out of that page, but can be seen
at https://www.mail-archive.com/features%40isocpp.open-std.org/msg00198.html#detail.cpp17.n4190
:

"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 acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk