#ifndef PYTHONIC_UTILS_NESTED_CONTAINER_HPP #define PYTHONIC_UTILS_NESTED_CONTAINER_HPP #include "pythonic/include/utils/nested_container.hpp" #include #include "pythonic/types/traits.hpp" #include "pythonic/utils/numpy_traits.hpp" PYTHONIC_NS_BEGIN namespace utils { template long nested_container_size::flat_size(T const &t) { return t.size() * nested_container_size::value, bool, typename Type::value_type>::type>::flat_size(*t.begin()); } /* Recursion stops on bool */ template constexpr long nested_container_size::flat_size(F) { return 1; } } PYTHONIC_NS_END #endif