// Copyright (c) 2018-2019 // Cem Bassoy // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // Fraunhofer and Google in producing this work // which started as a Google Summer of Code project. // #ifndef _BOOST_UBLAS_TEST_TENSOR_UTILITY_ #define _BOOST_UBLAS_TEST_TENSOR_UTILITY_ template struct zip_helper; template struct zip_helper, type1> { template struct with { using type = std::tuple...>; }; template using with_t = typename with::type; }; template struct zip_helper, type1, types1...> { template struct with { using next_tuple = std::tuple...>; using type = typename zip_helper::template with::type; }; template using with_t = typename with::type; }; template using zip = zip_helper,types...>; // creates e.g. // using test_types = zip::with_t; // equals // using test_types = std::tuple< std::pair, std::pair, std::pair, std::pair //>; //static_assert(std::is_same< std::tuple_element_t<0,std::tuple_element_t<0,test_types2>>, float>::value,"should be float "); //static_assert(std::is_same< std::tuple_element_t<1,std::tuple_element_t<0,test_types2>>, boost::numeric::ublas::first_order>::value,"should be boost::numeric::ublas::first_order "); #endif