ruby-rice / rice

Ruby Interface for C++ Extensions
http://ruby-rice.github.io/
Other
378 stars 63 forks source link

Improve exception handling for bad any cast #209

Closed ankane closed 1 month ago

ankane commented 1 month ago

Applies #207 to #208

I'm not sure about the best error message to show end users (since this seems like an internal error).

ankane commented 1 month ago

From what I can tell, the failing test on Windows is unrelated (previously mentioned in https://github.com/ruby-rice/rice/issues/182#issuecomment-1499393693).

cfis commented 1 month ago

Seems good to me. But I do have a question about #208 I added to the comments.

jasonroelofs commented 1 month ago

Please don't skip ci, especially for code changes. It's hard to see the actual state of the build when you do that.

jasonroelofs commented 1 month ago

Something on Windows doesn't like the test Tracking:CopyReference.

ankane commented 1 month ago

I believe this is a previous issue: https://github.com/ruby-rice/rice/issues/182#issuecomment-1499393693

While the CI logs are no longer retained, there are random failures on Windows from 8 months ago (run 1, run 2).

jasonroelofs commented 1 month ago

Ah right, and these errors would not have anything to do with this particular set of changes.

jasonroelofs commented 1 month ago

I've pushed these recent changes out as 4.3.2.

ankane commented 1 month ago

Thanks @jasonroelofs. It looks like #208 breaks Ubuntu 20.04, so looking into a fix.

/usr/include/c++/9/type_traits: In instantiation of ‘struct std::__and_<std::is_copy_constructible<std::_Tuple_impl<2, std::any> >, std::is_constructible<std::_Tuple_impl<2, std::any>, const std::_Tuple_impl<2, std::any>&> >’:
/usr/include/c++/9/any:181:58:   required by substitution of ‘template<class _ValueType, class _Tp, class _Mgr, typename std::enable_if<std::__and_<std::is_copy_constructible<_Tp>, std::is_constructible<_Tp, _ValueType&&> >::value, bool>::type <anonymous>, typename std::enable_if<(! std::__is_in_place_type<_Tp>::value), bool>::type <anonymous> > std::any::any(_ValueType&&) [with _ValueType = const std::_Tuple_impl<2, std::any>&; _Tp = std::_Tuple_impl<2, std::any>; _Mgr = std::any::_Manager_external<std::_Tuple_impl<2, std::any> >; typename std::enable_if<std::__and_<std::is_copy_constructible<_Tp>, std::is_constructible<_Tp, _ValueType&&> >::value, bool>::type <anonymous> = <missing>; typename std::enable_if<(! std::__is_in_place_type<_Tp>::value), bool>::type <anonymous> = <missing>]’
/usr/include/c++/9/type_traits:883:12:   required from ‘struct std::is_constructible<std::_Tuple_impl<2, std::any>, const std::_Tuple_impl<2, std::any>&>’
/usr/include/c++/9/type_traits:901:12:   required from ‘struct std::__is_copy_constructible_impl<std::_Tuple_impl<2, std::any>, true>’
/usr/include/c++/9/type_traits:907:12:   required from ‘struct std::is_copy_constructible<std::_Tuple_impl<2, std::any> >’
/usr/include/c++/9/type_traits:131:12:   required from ‘struct std::__and_<std::is_copy_constructible<std::_Tuple_impl<2, std::any> >, std::is_constructible<std::_Tuple_impl<2, std::any>, std::_Tuple_impl<2, std::any>&&> >’
/usr/include/c++/9/tuple:231:42:   recursively required from ‘constexpr std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _Head, _Tail ...>&&) [with long unsigned int _Idx = 1; _Head = long unsigned int; _Tail = {std::any}]’
/usr/include/c++/9/tuple:231:42:   required from ‘constexpr std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _Head, _Tail ...>&&) [with long unsigned int _Idx = 0; _Head = long unsigned int; _Tail = {long unsigned int, std::any}]’
/usr/include/c++/9/tuple:642:17:   required from ‘constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = long unsigned int; _U2 = std::tuple<long unsigned int, long unsigned int, std::any>; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<true, _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = true; _T1 = long unsigned int; _T2 = std::tuple<long unsigned int, long unsigned int, std::any>]’
/usr/include/c++/9/bits/stl_pair.h:529:14:   required from ‘constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = long unsigned int; _T2 = std::tuple<long unsigned int, long unsigned int, std::any>; typename std::__decay_and_strip<_T2>::__type = std::tuple<long unsigned int, long unsigned int, std::any>; typename std::__decay_and_strip<_Tp>::__type = long unsigned int]’
/home/runner/work/torch.rb/torch.rb/vendor/bundle/ruby/3.1.0/gems/rice-4.3.2/include/rice/rice.hpp:1141:109:   required from here
/usr/include/c++/9/type_traits:131:12: error: incomplete type ‘std::is_copy_constructible<std::_Tuple_impl<2, std::any> >’ used in nested name specifier
  131 |     struct __and_<_B1, _B2>
      |            ^~~~~~~~~~~~~~~~
/usr/include/c++/9/type_traits: In instantiation of ‘struct std::__and_<std::is_copy_constructible<std::_Tuple_impl<2, std::any> >, std::__not_<std::is_constructible<std::_Tuple_impl<2, std::any>, const std::_Tuple_impl<2, std::any>&> >, std::__not_<std::__is_in_place_type<std::_Tuple_impl<2, std::any> > > >’:
/usr/include/c++/9/type_traits:150:27:   required from ‘constexpr const bool std::__and_v<std::is_copy_constructible<std::_Tuple_impl<2, std::any> >, std::__not_<std::is_constructible<std::_Tuple_impl<2, std::any>, const std::_Tuple_impl<2, std::any>&> >, std::__not_<std::__is_in_place_type<std::_Tuple_impl<2, std::any> > > >’
/usr/include/c++/9/any:192:27:   required by substitution of ‘template<class _ValueType, class _Tp, class _Mgr, typename std::enable_if<__and_v<std::is_copy_constructible<_Tp>, std::__not_<std::is_constructible<_Tp, _ValueType&&> >, std::__not_<std::__is_in_place_type<_Tp> > >, bool>::type <anonymous> > std::any::any(_ValueType&&) [with _ValueType = const std::_Tuple_impl<2, std::any>&; _Tp = std::_Tuple_impl<2, std::any>; _Mgr = std::any::_Manager_external<std::_Tuple_impl<2, std::any> >; typename std::enable_if<__and_v<std::is_copy_constructible<_Tp>, std::__not_<std::is_constructible<_Tp, _ValueType&&> >, std::__not_<std::__is_in_place_type<_Tp> > >, bool>::type <anonymous> = <missing>]’
/usr/include/c++/9/type_traits:883:12:   required from ‘struct std::is_constructible<std::_Tuple_impl<2, std::any>, const std::_Tuple_impl<2, std::any>&>’
/usr/include/c++/9/type_traits:901:12:   required from ‘struct std::__is_copy_constructible_impl<std::_Tuple_impl<2, std::any>, true>’
/usr/include/c++/9/type_traits:907:12:   required from ‘struct std::is_copy_constructible<std::_Tuple_impl<2, std::any> >’
/usr/include/c++/9/type_traits:131:12:   required from ‘struct std::__and_<std::is_copy_constructible<std::_Tuple_impl<2, std::any> >, std::is_constructible<std::_Tuple_impl<2, std::any>, std::_Tuple_impl<2, std::any>&&> >’
/usr/include/c++/9/tuple:231:42:   recursively required from ‘constexpr std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _Head, _Tail ...>&&) [with long unsigned int _Idx = 1; _Head = long unsigned int; _Tail = {std::any}]’
/usr/include/c++/9/tuple:231:42:   required from ‘constexpr std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _Head, _Tail ...>&&) [with long unsigned int _Idx = 0; _Head = long unsigned int; _Tail = {long unsigned int, std::any}]’
/usr/include/c++/9/tuple:642:17:   required from ‘constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = long unsigned int; _U2 = std::tuple<long unsigned int, long unsigned int, std::any>; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<true, _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = true; _T1 = long unsigned int; _T2 = std::tuple<long unsigned int, long unsigned int, std::any>]’
/usr/include/c++/9/bits/stl_pair.h:529:14:   required from ‘constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = long unsigned int; _T2 = std::tuple<long unsigned int, long unsigned int, std::any>; typename std::__decay_and_strip<_T2>::__type = std::tuple<long unsigned int, long unsigned int, std::any>; typename std::__decay_and_strip<_Tp>::__type = long unsigned int]’
/home/runner/work/torch.rb/torch.rb/vendor/bundle/ruby/3.1.0/gems/rice-4.3.2/include/rice/rice.hpp:1141:109:   required from here
/usr/include/c++/9/type_traits:136:12: error: incomplete type ‘std::is_copy_constructible<std::_Tuple_impl<2, std::any> >’ used in nested name specifier
  136 |     struct __and_<_B1, _B2, _B3, _Bn...>
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/type_traits: In instantiation of ‘constexpr const bool std::__and_v<std::is_copy_constructible<std::_Tuple_impl<2, std::any> >, std::__not_<std::is_constructible<std::_Tuple_impl<2, std::any>, const std::_Tuple_impl<2, std::any>&> >, std::__not_<std::__is_in_place_type<std::_Tuple_impl<2, std::any> > > >’:
/usr/include/c++/9/any:192:27:   required by substitution of ‘template<class _ValueType, class _Tp, class _Mgr, typename std::enable_if<__and_v<std::is_copy_constructible<_Tp>, std::__not_<std::is_constructible<_Tp, _ValueType&&> >, std::__not_<std::__is_in_place_type<_Tp> > >, bool>::type <anonymous> > std::any::any(_ValueType&&) [with _ValueType = const std::_Tuple_impl<2, std::any>&; _Tp = std::_Tuple_impl<2, std::any>; _Mgr = std::any::_Manager_external<std::_Tuple_impl<2, std::any> >; typename std::enable_if<__and_v<std::is_copy_constructible<_Tp>, std::__not_<std::is_constructible<_Tp, _ValueType&&> >, std::__not_<std::__is_in_place_type<_Tp> > >, bool>::type <anonymous> = <missing>]’
/usr/include/c++/9/type_traits:883:12:   required from ‘struct std::is_constructible<std::_Tuple_impl<2, std::any>, const std::_Tuple_impl<2, std::any>&>’
/usr/include/c++/9/type_traits:901:12:   required from ‘struct std::__is_copy_constructible_impl<std::_Tuple_impl<2, std::any>, true>’
/usr/include/c++/9/type_traits:907:12:   required from ‘struct std::is_copy_constructible<std::_Tuple_impl<2, std::any> >’
/usr/include/c++/9/type_traits:131:12:   required from ‘struct std::__and_<std::is_copy_constructible<std::_Tuple_impl<2, std::any> >, std::is_constructible<std::_Tuple_impl<2, std::any>, std::_Tuple_impl<2, std::any>&&> >’
/usr/include/c++/9/tuple:231:42:   recursively required from ‘constexpr std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _Head, _Tail ...>&&) [with long unsigned int _Idx = 1; _Head = long unsigned int; _Tail = {std::any}]’
/usr/include/c++/9/tuple:231:42:   required from ‘constexpr std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _Head, _Tail ...>&&) [with long unsigned int _Idx = 0; _Head = long unsigned int; _Tail = {long unsigned int, std::any}]’
/usr/include/c++/9/tuple:642:17:   required from ‘constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = long unsigned int; _U2 = std::tuple<long unsigned int, long unsigned int, std::any>; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<true, _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = true; _T1 = long unsigned int; _T2 = std::tuple<long unsigned int, long unsigned int, std::any>]’
/usr/include/c++/9/bits/stl_pair.h:529:14:   required from ‘constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = long unsigned int; _T2 = std::tuple<long unsigned int, long unsigned int, std::any>; typename std::__decay_and_strip<_T2>::__type = std::tuple<long unsigned int, long unsigned int, std::any>; typename std::__decay_and_strip<_Tp>::__type = long unsigned int]’
/home/runner/work/torch.rb/torch.rb/vendor/bundle/ruby/3.1.0/gems/rice-4.3.2/include/rice/rice.hpp:1141:109:   required from here
/usr/include/c++/9/type_traits:150:27: error: ‘value’ is not a member of ‘std::__and_<std::is_copy_constructible<std::_Tuple_impl<2, std::any> >, std::__not_<std::is_constructible<std::_Tuple_impl<2, std::any>, const std::_Tuple_impl<2, std::any>&> >, std::__not_<std::__is_in_place_type<std::_Tuple_impl<2, std::any> > > >’
  150 |     inline constexpr bool __and_v = __and_<_Bn...>::value;
      |                           ^~~~~~~
/usr/include/c++/9/type_traits: In instantiation of ‘struct std::__not_<std::is_constructible<std::_Tuple_impl<2, std::any>, std::_Tuple_impl<2, std::any>&&> >’:
/usr/include/c++/9/type_traits:131:12:   required from ‘struct std::__and_<std::__not_<std::is_constructible<std::_Tuple_impl<2, std::any>, std::_Tuple_impl<2, std::any>&&> >, std::__not_<std::__is_in_place_type<std::_Tuple_impl<2, std::any> > > >’
/usr/include/c++/9/type_traits:136:12:   required from ‘struct std::__and_<std::is_copy_constructible<std::_Tuple_impl<2, std::any> >, std::__not_<std::is_constructible<std::_Tuple_impl<2, std::any>, std::_Tuple_impl<2, std::any>&&> >, std::__not_<std::__is_in_place_type<std::_Tuple_impl<2, std::any> > > >’
/usr/include/c++/9/type_traits:150:27:   required from ‘constexpr const bool std::__and_v<std::is_copy_constructible<std::_Tuple_impl<2, std::any> >, std::__not_<std::is_constructible<std::_Tuple_impl<2, std::any>, std::_Tuple_impl<2, std::any>&&> >, std::__not_<std::__is_in_place_type<std::_Tuple_impl<2, std::any> > > >’
/usr/include/c++/9/any:192:27:   required by substitution of ‘template<class _ValueType, class _Tp, class _Mgr, typename std::enable_if<__and_v<std::is_copy_constructible<_Tp>, std::__not_<std::is_constructible<_Tp, _ValueType&&> >, std::__not_<std::__is_in_place_type<_Tp> > >, bool>::type <anonymous> > std::any::any(_ValueType&&) [with _ValueType = std::_Tuple_impl<2, std::any>; _Tp = std::_Tuple_impl<2, std::any>; _Mgr = std::any::_Manager_external<std::_Tuple_impl<2, std::any> >; typename std::enable_if<__and_v<std::is_copy_constructible<_Tp>, std::__not_<std::is_constructible<_Tp, _ValueType&&> >, std::__not_<std::__is_in_place_type<_Tp> > >, bool>::type <anonymous> = <missing>]’
/usr/include/c++/9/type_traits:883:12:   required from ‘struct std::is_constructible<std::_Tuple_impl<2, std::any>, std::_Tuple_impl<2, std::any>&&>’
/usr/include/c++/9/type_traits:131:12:   required from ‘struct std::__and_<std::is_copy_constructible<std::_Tuple_impl<2, std::any> >, std::is_constructible<std::_Tuple_impl<2, std::any>, std::_Tuple_impl<2, std::any>&&> >’
/usr/include/c++/9/tuple:231:42:   recursively required from ‘constexpr std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _Head, _Tail ...>&&) [with long unsigned int _Idx = 1; _Head = long unsigned int; _Tail = {std::any}]’
/usr/include/c++/9/tuple:231:42:   required from ‘constexpr std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _Head, _Tail ...>&&) [with long unsigned int _Idx = 0; _Head = long unsigned int; _Tail = {long unsigned int, std::any}]’
/usr/include/c++/9/tuple:642:17:   required from ‘constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = long unsigned int; _U2 = std::tuple<long unsigned int, long unsigned int, std::any>; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<true, _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = true; _T1 = long unsigned int; _T2 = std::tuple<long unsigned int, long unsigned int, std::any>]’
/usr/include/c++/9/bits/stl_pair.h:529:14:   required from ‘constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = long unsigned int; _T2 = std::tuple<long unsigned int, long unsigned int, std::any>; typename std::__decay_and_strip<_T2>::__type = std::tuple<long unsigned int, long unsigned int, std::any>; typename std::__decay_and_strip<_Tp>::__type = long unsigned int]’
/home/runner/work/torch.rb/torch.rb/vendor/bundle/ruby/3.1.0/gems/rice-4.3.2/include/rice/rice.hpp:1141:109:   required from here
/usr/include/c++/9/type_traits:142:31: error: incomplete type ‘std::is_constructible<std::_Tuple_impl<2, std::any>, std::_Tuple_impl<2, std::any>&&>’ used in nested name specifier
  142 |     : public __bool_constant<!bool(_Pp::value)>
      |                               ^~~~~~~~~~~~~~~~
/usr/include/c++/9/type_traits: In instantiation of ‘struct std::__and_<std::__not_<std::is_constructible<std::_Tuple_impl<2, std::any>, std::_Tuple_impl<2, std::any>&&> >, std::__not_<std::__is_in_place_type<std::_Tuple_impl<2, std::any> > > >’:
/usr/include/c++/9/type_traits:136:12:   required from ‘struct std::__and_<std::is_copy_constructible<std::_Tuple_impl<2, std::any> >, std::__not_<std::is_constructible<std::_Tuple_impl<2, std::any>, std::_Tuple_impl<2, std::any>&&> >, std::__not_<std::__is_in_place_type<std::_Tuple_impl<2, std::any> > > >’
/usr/include/c++/9/type_traits:150:27:   required from ‘constexpr const bool std::__and_v<std::is_copy_constructible<std::_Tuple_impl<2, std::any> >, std::__not_<std::is_constructible<std::_Tuple_impl<2, std::any>, std::_Tuple_impl<2, std::any>&&> >, std::__not_<std::__is_in_place_type<std::_Tuple_impl<2, std::any> > > >’
/usr/include/c++/9/any:192:27:   required by substitution of ‘template<class _ValueType, class _Tp, class _Mgr, typename std::enable_if<__and_v<std::is_copy_constructible<_Tp>, std::__not_<std::is_constructible<_Tp, _ValueType&&> >, std::__not_<std::__is_in_place_type<_Tp> > >, bool>::type <anonymous> > std::any::any(_ValueType&&) [with _ValueType = std::_Tuple_impl<2, std::any>; _Tp = std::_Tuple_impl<2, std::any>; _Mgr = std::any::_Manager_external<std::_Tuple_impl<2, std::any> >; typename std::enable_if<__and_v<std::is_copy_constructible<_Tp>, std::__not_<std::is_constructible<_Tp, _ValueType&&> >, std::__not_<std::__is_in_place_type<_Tp> > >, bool>::type <anonymous> = <missing>]’
/usr/include/c++/9/type_traits:883:12:   required from ‘struct std::is_constructible<std::_Tuple_impl<2, std::any>, std::_Tuple_impl<2, std::any>&&>’
/usr/include/c++/9/type_traits:131:12:   required from ‘struct std::__and_<std::is_copy_constructible<std::_Tuple_impl<2, std::any> >, std::is_constructible<std::_Tuple_impl<2, std::any>, std::_Tuple_impl<2, std::any>&&> >’
/usr/include/c++/9/tuple:231:42:   recursively required from ‘constexpr std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _Head, _Tail ...>&&) [with long unsigned int _Idx = 1; _Head = long unsigned int; _Tail = {std::any}]’
/usr/include/c++/9/tuple:231:42:   required from ‘constexpr std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _Head, _Tail ...>&&) [with long unsigned int _Idx = 0; _Head = long unsigned int; _Tail = {long unsigned int, std::any}]’
/usr/include/c++/9/tuple:642:17:   required from ‘constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = long unsigned int; _U2 = std::tuple<long unsigned int, long unsigned int, std::any>; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<true, _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = true; _T1 = long unsigned int; _T2 = std::tuple<long unsigned int, long unsigned int, std::any>]’
/usr/include/c++/9/bits/stl_pair.h:529:14:   required from ‘constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = long unsigned int; _T2 = std::tuple<long unsigned int, long unsigned int, std::any>; typename std::__decay_and_strip<_T2>::__type = std::tuple<long unsigned int, long unsigned int, std::any>; typename std::__decay_and_strip<_Tp>::__type = long unsigned int]’
/home/runner/work/torch.rb/torch.rb/vendor/bundle/ruby/3.1.0/gems/rice-4.3.2/include/rice/rice.hpp:1141:109:   required from here
/usr/include/c++/9/type_traits:131:12: error: ‘value’ is not a member of ‘std::__not_<std::is_constructible<std::_Tuple_impl<2, std::any>, std::_Tuple_impl<2, std::any>&&> >’
  131 |     struct __and_<_B1, _B2>
      |            ^~~~~~~~~~~~~~~~
/usr/include/c++/9/type_traits: In instantiation of ‘constexpr const bool std::__and_v<std::is_copy_constructible<std::_Tuple_impl<2, std::any> >, std::__not_<std::is_constructible<std::_Tuple_impl<2, std::any>, std::_Tuple_impl<2, std::any>&&> >, std::__not_<std::__is_in_place_type<std::_Tuple_impl<2, std::any> > > >’:
/usr/include/c++/9/any:192:27:   required by substitution of ‘template<class _ValueType, class _Tp, class _Mgr, typename std::enable_if<__and_v<std::is_copy_constructible<_Tp>, std::__not_<std::is_constructible<_Tp, _ValueType&&> >, std::__not_<std::__is_in_place_type<_Tp> > >, bool>::type <anonymous> > std::any::any(_ValueType&&) [with _ValueType = std::_Tuple_impl<2, std::any>; _Tp = std::_Tuple_impl<2, std::any>; _Mgr = std::any::_Manager_external<std::_Tuple_impl<2, std::any> >; typename std::enable_if<__and_v<std::is_copy_constructible<_Tp>, std::__not_<std::is_constructible<_Tp, _ValueType&&> >, std::__not_<std::__is_in_place_type<_Tp> > >, bool>::type <anonymous> = <missing>]’
/usr/include/c++/9/type_traits:883:12:   required from ‘struct std::is_constructible<std::_Tuple_impl<2, std::any>, std::_Tuple_impl<2, std::any>&&>’
/usr/include/c++/9/type_traits:131:12:   required from ‘struct std::__and_<std::is_copy_constructible<std::_Tuple_impl<2, std::any> >, std::is_constructible<std::_Tuple_impl<2, std::any>, std::_Tuple_impl<2, std::any>&&> >’
/usr/include/c++/9/tuple:231:42:   recursively required from ‘constexpr std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _Head, _Tail ...>&&) [with long unsigned int _Idx = 1; _Head = long unsigned int; _Tail = {std::any}]’
/usr/include/c++/9/tuple:231:42:   required from ‘constexpr std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _Head, _Tail ...>&&) [with long unsigned int _Idx = 0; _Head = long unsigned int; _Tail = {long unsigned int, std::any}]’
/usr/include/c++/9/tuple:642:17:   required from ‘constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = long unsigned int; _U2 = std::tuple<long unsigned int, long unsigned int, std::any>; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<true, _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = true; _T1 = long unsigned int; _T2 = std::tuple<long unsigned int, long unsigned int, std::any>]’
/usr/include/c++/9/bits/stl_pair.h:529:14:   required from ‘constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = long unsigned int; _T2 = std::tuple<long unsigned int, long unsigned int, std::any>; typename std::__decay_and_strip<_T2>::__type = std::tuple<long unsigned int, long unsigned int, std::any>; typename std::__decay_and_strip<_Tp>::__type = long unsigned int]’
/home/runner/work/torch.rb/torch.rb/vendor/bundle/ruby/3.1.0/gems/rice-4.3.2/include/rice/rice.hpp:1141:109:   required from here
/usr/include/c++/9/type_traits:150:27: error: ‘value’ is not a member of ‘std::__and_<std::is_copy_constructible<std::_Tuple_impl<2, std::any> >, std::__not_<std::is_constructible<std::_Tuple_impl<2, std::any>, std::_Tuple_impl<2, std::any>&&> >, std::__not_<std::__is_in_place_type<std::_Tuple_impl<2, std::any> > > >’
  150 |     inline constexpr bool __and_v = __and_<_Bn...>::value;