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

Arthur O'Dwyer via libcxx-commits libcxx-commits at lists.llvm.org
Thu Aug 26 08:35:23 PDT 2021


Author: Arthur O'Dwyer
Date: 2021-08-26T11:35:07-04:00
New Revision: 15acca5ccde4f88e6073ebf773ce631617b55946

URL: https://github.com/llvm/llvm-project/commit/15acca5ccde4f88e6073ebf773ce631617b55946
DIFF: https://github.com/llvm/llvm-project/commit/15acca5ccde4f88e6073ebf773ce631617b55946.diff

LOG: [libc++] Revert a use of `static_cast` for `_VSTD::forward`. NFCI.

As requested in D107584.

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

Added: 
    

Modified: 
    libcxx/include/__concepts/boolean_testable.h

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__concepts/boolean_testable.h b/libcxx/include/__concepts/boolean_testable.h
index cae5e453fd775..638fc3b20330c 100644
--- a/libcxx/include/__concepts/boolean_testable.h
+++ b/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 @@ 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)


        


More information about the libcxx-commits mailing list