[libc++] Revert a use of `static_cast` for `_VSTD::forward`. NFCI.
authorArthur O'Dwyer <arthur.j.odwyer@gmail.com>
Wed, 25 Aug 2021 23:40:03 +0000 (19:40 -0400)
committerArthur O'Dwyer <arthur.j.odwyer@gmail.com>
Thu, 26 Aug 2021 15:35:07 +0000 (11:35 -0400)
As requested in D107584.

Differential Revision: https://reviews.llvm.org/D108743

libcxx/include/__concepts/boolean_testable.h

index cae5e45..638fc3b 100644 (file)
@@ -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 @@ concept __boolean_testable_impl = convertible_to<_Tp, bool>;
 
 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)