[libcxx-commits] [PATCH] D68879: P1152R4: Fix deprecation warnings in libc++ testsuite and in uses of is_invocable that would internally conjure up a deprecated function type.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 11 14:50:11 PDT 2019


ldionne added inline comments.


================
Comment at: libcxx/include/type_traits:1123
+// Suppress deprecation notice for volatile-qualified return type.
+_LIBCPP_SUPPRESS_DEPRECATED_PUSH
 template <class _Tp> _Tp&& __declval(int);
----------------
rsmith wrote:
> ldionne wrote:
> > Wait, I don't see any `volatile` qualification here?
> The volatile comes from `_Tp`, specified indirectly through various callers that internally use `declval`. In particular, the `is_invocable<volatile T>` tests end up here.
That's what I thought, but isn't that warning broken then? Isn't any template going to produce a warning when instantiated with a `volatile T`? I must be misunderstanding something.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68879





More information about the libcxx-commits mailing list