| 15 | namespace hana = boost::hana; |
| 16 | |
| 17 | int main() { |
| 18 | constexpr auto type = hana::type_c<int[2][3][4]>; |
| 19 | |
| 20 | BOOST_HANA_CONSTANT_CHECK( |
| 21 | hana::is_an<hana::integral_constant_tag<size_t>>( |
| 22 | hana::traits::extent(type, hana::uint_c<1>) |
| 23 | ) |
| 24 | ); |
| 25 | |
| 26 | // Check that we can multiple extents in size_t's ring |
| 27 | hana::product<hana::integral_constant_tag<size_t>>( |
| 28 | hana::transform( |
| 29 | hana::to_tuple( |
| 30 | hana::make_range( |
| 31 | hana::size_c<0>, |
| 32 | hana::traits::rank(type) |
| 33 | ) |
| 34 | ), |
| 35 | hana::partial(hana::traits::extent, type) |
| 36 | ) |
| 37 | ); |
| 38 | } |