@@ -993,7 +993,8 @@ template <class _Tp, class... _Properties>
993993{
994994 static_assert (::cuda::std::is_void_v<_Tp> || ::cuda::mr::resource_with<_Tp, _Properties...>,
995995 " _Tp must be void or satisfy resource_with<_Tp, _Properties...>" );
996- return ::cuda::__any_cast<_Tp>(__res);
996+ // Use static_cast to the __basic_any base to work around GCC < 11 template argument deduction issues.
997+ return ::cuda::__any_cast<_Tp>(static_cast <::cuda::__basic_any<__iasync_resource<_Properties...>>*>(__res));
997998}
998999
9991000// ! @overload
@@ -1002,7 +1003,7 @@ template <class _Tp, class... _Properties>
10021003{
10031004 static_assert (::cuda::std::is_void_v<_Tp> || ::cuda::mr::resource_with<_Tp, _Properties...>,
10041005 " _Tp must be void or satisfy resource_with<_Tp, _Properties...>" );
1005- return ::cuda::__any_cast<_Tp>(__res);
1006+ return ::cuda::__any_cast<_Tp>(static_cast < const ::cuda::__basic_any<__iasync_resource<_Properties...>>*>( __res) );
10061007}
10071008
10081009// ! @overload
@@ -1011,7 +1012,7 @@ template <class _Tp, class... _Properties>
10111012{
10121013 static_assert (::cuda::std::is_void_v<_Tp> || ::cuda::mr::synchronous_resource_with<_Tp, _Properties...>,
10131014 " _Tp must be void or satisfy synchronous_resource_with<_Tp, _Properties...>" );
1014- return ::cuda::__any_cast<_Tp>(__res);
1015+ return ::cuda::__any_cast<_Tp>(static_cast <::cuda::__basic_any<__iresource<_Properties...>>*>( __res) );
10151016}
10161017
10171018// ! @overload
@@ -1021,7 +1022,7 @@ template <class _Tp, class... _Properties>
10211022{
10221023 static_assert (::cuda::std::is_void_v<_Tp> || ::cuda::mr::synchronous_resource_with<_Tp, _Properties...>,
10231024 " _Tp must be void or satisfy synchronous_resource_with<_Tp, _Properties...>" );
1024- return ::cuda::__any_cast<_Tp>(__res);
1025+ return ::cuda::__any_cast<_Tp>(static_cast < const ::cuda::__basic_any<__iresource<_Properties...>>*>( __res) );
10251026}
10261027
10271028// ! @overload
@@ -1030,7 +1031,7 @@ template <class _Tp, class... _Properties>
10301031{
10311032 static_assert (::cuda::std::is_void_v<_Tp> || ::cuda::mr::resource_with<_Tp, _Properties...>,
10321033 " _Tp must be void or satisfy resource_with<_Tp, _Properties...>" );
1033- return ::cuda::__any_cast<_Tp>(__res);
1034+ return ::cuda::__any_cast<_Tp>(static_cast <::cuda::__basic_any<__iasync_resource<_Properties...>&>*>( __res) );
10341035}
10351036
10361037// ! @overload
@@ -1039,7 +1040,7 @@ template <class _Tp, class... _Properties>
10391040{
10401041 static_assert (::cuda::std::is_void_v<_Tp> || ::cuda::mr::resource_with<_Tp, _Properties...>,
10411042 " _Tp must be void or satisfy resource_with<_Tp, _Properties...>" );
1042- return ::cuda::__any_cast<_Tp>(__res);
1043+ return ::cuda::__any_cast<_Tp>(static_cast < const ::cuda::__basic_any<__iasync_resource<_Properties...>&>*>( __res) );
10431044}
10441045
10451046// ! @overload
@@ -1048,7 +1049,7 @@ template <class _Tp, class... _Properties>
10481049{
10491050 static_assert (::cuda::std::is_void_v<_Tp> || ::cuda::mr::synchronous_resource_with<_Tp, _Properties...>,
10501051 " _Tp must be void or satisfy synchronous_resource_with<_Tp, _Properties...>" );
1051- return ::cuda::__any_cast<_Tp>(__res);
1052+ return ::cuda::__any_cast<_Tp>(static_cast <::cuda::__basic_any<__iresource<_Properties...>&>*>( __res) );
10521053}
10531054
10541055// ! @overload
@@ -1058,7 +1059,7 @@ template <class _Tp, class... _Properties>
10581059{
10591060 static_assert (::cuda::std::is_void_v<_Tp> || ::cuda::mr::synchronous_resource_with<_Tp, _Properties...>,
10601061 " _Tp must be void or satisfy synchronous_resource_with<_Tp, _Properties...>" );
1061- return ::cuda::__any_cast<_Tp>(__res);
1062+ return ::cuda::__any_cast<_Tp>(static_cast < const ::cuda::__basic_any<__iresource<_Properties...>&>*>( __res) );
10621063}
10631064
10641065// ── dynamic_resource_cast ───────────────────────────────────────────────────
0 commit comments