[libcxx-commits] [PATCH] D134473: [libc++] Keep unary_function and binary_function in C++17 for one more release

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Sep 23 12:43:15 PDT 2022


philnik accepted this revision.
philnik added a comment.
This revision is now accepted and ready to land.

LGTM with green CI and comments addressed.



================
Comment at: libcxx/docs/ReleaseNotes.rst:147
+  that this disables all deprecation warnings. Also note that per the Standard, ``unary_function``
+  and ``binary_function`` will be removed in C++17 and above starting in the next release.
 
----------------
Mordante wrote:
> This is the typical wording we use.
Could we move the `in the next release` part into it's own sentence? Something like `... and above. This will be enforced in LLVM 16.`. I find the current wording quite confusing.


================
Comment at: libcxx/include/__functional/binary_function.h:26
 {
-    typedef _Arg1   first_argument_type;
-    typedef _Arg2   second_argument_type;
-    typedef _Result result_type;
+    typedef _Arg1   first_argument_type _LIBCPP_DEPRECATED_IN_CXX17;
+    typedef _Arg2   second_argument_type _LIBCPP_DEPRECATED_IN_CXX17;
----------------
Can we get a message here? Something like `binary_function will be removed in LLVM 16 from C++17 and above`. The wording isn't great, but it's nicer than having to dig through release notes to find out. Same for `unary_function`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134473/new/

https://reviews.llvm.org/D134473



More information about the libcxx-commits mailing list