[libcxx-commits] [PATCH] D108743: [libc++] Revert a use of `static_cast` for `_VSTD::forward`. NFCI

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Aug 25 16:42:17 PDT 2021


Quuxplusone created this revision.
Quuxplusone added a reviewer: ldionne.
Quuxplusone added a project: libc++.
Quuxplusone requested review of this revision.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

As requested in D107584 <https://reviews.llvm.org/D107584>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108743

Files:
  libcxx/include/__concepts/boolean_testable.h


Index: libcxx/include/__concepts/boolean_testable.h
===================================================================
--- libcxx/include/__concepts/boolean_testable.h
+++ libcxx/include/__concepts/boolean_testable.h
@@ -11,6 +11,7 @@
 
 #include <__concepts/convertible_to.h>
 #include <__config>
+#include <__utility/forward.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
@@ -27,7 +28,7 @@
 
 template<class _Tp>
 concept __boolean_testable = __boolean_testable_impl<_Tp> && requires(_Tp&& __t) {
-  { !static_cast<_Tp&&>(__t) } -> __boolean_testable_impl;
+  { !_VSTD::forward<_Tp>(__t) } -> __boolean_testable_impl;
 };
 
 #endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108743.368775.patch
Type: text/x-patch
Size: 732 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210825/5bb73c7d/attachment.bin>


More information about the libcxx-commits mailing list