Index: libcxx/docs/Status/Cxx2bIssues.csv =================================================================== --- libcxx/docs/Status/Cxx2bIssues.csv +++ libcxx/docs/Status/Cxx2bIssues.csv @@ -280,7 +280,7 @@ "`3622 `__","Misspecified transitivity of equivalence in ยง[unord.req.general]","February 2023","","","" "`3631 `__","``basic_format_arg(T&&)`` should use ``remove_cvref_t`` throughout","February 2023","|Complete|","15.0","" "`3645 `__","``resize_and_overwrite`` is overspecified to call its callback with lvalues","February 2023","|Complete|","14.0","" -"`3655 `__","The ``INVOKE`` operation and union types","February 2023","","","" +"`3655 `__","The ``INVOKE`` operation and union types","February 2023","|Complete|","17.0","" "`3723 `__","``priority_queue::push_range`` needs to ``append_range``","February 2023","","","|ranges|" "`3734 `__","Inconsistency in ``inout_ptr`` and ``out_ptr`` for empty case","February 2023","","","" "`3772 `__","``repeat_view``'s ``piecewise`` constructor is missing Postconditions","February 2023","","","|ranges|" Index: libcxx/include/__functional/invoke.h =================================================================== --- libcxx/include/__functional/invoke.h +++ libcxx/include/__functional/invoke.h @@ -272,7 +272,7 @@ using __enable_if_bullet1 = typename enable_if < is_member_function_pointer<_DecayFp>::value - && is_base_of<_ClassT, _DecayA0>::value + && (is_same<_ClassT, _DecayA0>::value || is_base_of<_ClassT, _DecayA0>::value) >::type; template ::value - && !is_base_of<_ClassT, _DecayA0>::value + && !(is_same<_ClassT, _DecayA0>::value || is_base_of<_ClassT, _DecayA0>::value) && !__is_reference_wrapper<_DecayA0>::value >::type; @@ -302,7 +302,7 @@ using __enable_if_bullet4 = typename enable_if < is_member_object_pointer<_DecayFp>::value - && is_base_of<_ClassT, _DecayA0>::value + && (is_same<_ClassT, _DecayA0>::value || is_base_of<_ClassT, _DecayA0>::value) >::type; template ::value - && !is_base_of<_ClassT, _DecayA0>::value + && !(is_same<_ClassT, _DecayA0>::value || is_base_of<_ClassT, _DecayA0>::value) && !__is_reference_wrapper<_DecayA0>::value >::type; Index: libcxx/test/std/utilities/function.objects/func.invoke/invoke.pass.cpp =================================================================== --- libcxx/test/std/utilities/function.objects/func.invoke/invoke.pass.cpp +++ libcxx/test/std/utilities/function.objects/func.invoke/invoke.pass.cpp @@ -346,6 +346,25 @@ } } +// LWG-3655: The INVOKE operation and union types +union Union { + int x; +}; +static_assert(std::is_invocable_v); +static_assert(std::is_invocable_v); +static_assert(std::is_invocable_v); +static_assert(std::is_invocable_v); + +static_assert(std::is_invocable_v); +static_assert(std::is_invocable_v); +static_assert(!std::is_invocable_v); +static_assert(!std::is_invocable_v); + +static_assert(std::is_invocable_v); +static_assert(std::is_invocable_v); +static_assert(std::is_invocable_v); +static_assert(std::is_invocable_v); + int main(int, char**) { bullet_one_two_tests(); bullet_three_four_tests();