[llvm-branch-commits] [libcxx] 9d50958 - [libc++] Fix build after 51faba35fd81fbd3af407a29c136895a718ccd96

Louis Dionne via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jan 25 10:45:56 PST 2021


Author: Ruslan Arutyunyan
Date: 2021-01-25T13:40:47-05:00
New Revision: 9d5095875754046972d8512d98194acf7f032e36

URL: https://github.com/llvm/llvm-project/commit/9d5095875754046972d8512d98194acf7f032e36
DIFF: https://github.com/llvm/llvm-project/commit/9d5095875754046972d8512d98194acf7f032e36.diff

LOG: [libc++] Fix build after 51faba35fd81fbd3af407a29c136895a718ccd96

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

Added: 
    

Modified: 
    libcxx/include/variant

Removed: 
    


################################################################################
diff  --git a/libcxx/include/variant b/libcxx/include/variant
index cb46f09bdc06..2dfab9d40dd7 100644
--- a/libcxx/include/variant
+++ b/libcxx/include/variant
@@ -1635,10 +1635,10 @@ constexpr bool operator>=(const variant<_Types...>& __lhs,
       __lhs.index(), __convert_to_bool<greater_equal<>>{}, __lhs, __rhs);
 }
 
-template <class _Visitor, class... _Vs>
+template <class... _Vs>
 inline _LIBCPP_INLINE_VISIBILITY
 _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
-constexpr void __throw_if_valueless(_Visitor&& __visitor, _Vs&&... __vs) {
+constexpr void __throw_if_valueless(_Vs&&... __vs) {
   const bool __valueless = (... || __vs.valueless_by_exception());
   if (__valueless) {
       __throw_bad_variant_access();
@@ -1650,8 +1650,7 @@ inline _LIBCPP_INLINE_VISIBILITY
 _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
 constexpr decltype(auto) visit(_Visitor&& __visitor, _Vs&&... __vs) {
   using __variant_detail::__visitation::__variant;
-  _VSTD::__throw_if_valueless(_VSTD::forward<_Visitor>(__visitor),
-                              _VSTD::forward<_Vs>(__vs)...);
+  _VSTD::__throw_if_valueless(_VSTD::forward<_Vs>(__vs)...);
   return __variant::__visit_value(_VSTD::forward<_Visitor>(__visitor),
                                   _VSTD::forward<_Vs>(__vs)...);
 }
@@ -1662,8 +1661,7 @@ inline _LIBCPP_INLINE_VISIBILITY
 _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
 constexpr _Rp visit(_Visitor&& __visitor, _Vs&&... __vs) {
   using __variant_detail::__visitation::__variant;
-  _VSTD::__throw_if_valueless(_VSTD::forward<_Visitor>(__visitor),
-                              _VSTD::forward<_Vs>(__vs)...);
+  _VSTD::__throw_if_valueless(_VSTD::forward<_Vs>(__vs)...);
   return __variant::__visit_value<_Rp>(_VSTD::forward<_Visitor>(__visitor),
                                        _VSTD::forward<_Vs>(__vs)...);
 }


        


More information about the llvm-branch-commits mailing list