On Fri, May 6, 2016 at 4:32 AM, Rainer Deyke
3a) Provide boost::binary_function
, which inherits std::binary_function 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-recommendat.... (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#de... : "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