void test() {
typedef indexmaps::cuboid::slicing_TO_order::sliced_memory_order S1;
constexpr auto s1 = S1::value;
//std::cout << " sliced "<< std::hex<< S1::value << " " <() << std::endl;
std::cout << P() << std::endl;
//std::cout << "mashk "<< std::hex<();
test< permutation(0,1,2) ,permutation(0,1,2,3), range, range,int, range>();
test< permutations::identity(4) ,permutation(0,1,2,3), range, range, range, range>();
//test< permutation(0,1,2,3) ,permutation(0,1,2,3), range, range, range, range>();
test< 0 ,permutation(0,1,2,3), int, int, int, int> ();
std::cout << " c order " << std::endl ;
test< permutation(1,0) ,permutation(3,2,1,0), int, range,int, range>();
test< permutation(2,1,0) ,permutation(3,2,1,0), int, range, range, range>();
test< permutation(2,1,0) ,permutation(3,2,1,0), range,int, range, range>();
test< permutation(2,1,0) ,permutation(3,2,1,0), range, range,int, range>();
test< permutation(2,1,0) ,permutation(3,2,1,0), range, range, range, int>();
test< permutation(3,2,1,0) ,permutation(3,2,1,0), range, range, range, range>();
test< 0 ,permutation(3,2,1,0), int, int, int, int> ();
test< permutation(0), permutation(0,1), int, range>();
std::cout << " custom order " << std::endl ;
test< permutation(1,0) ,permutation(0,3,1,2), int, range,int, range>();
test< permutation(2,0,1) ,permutation(0,3,1,2), int, range, range, range>();
test< permutation(0,2,1) ,permutation(0,3,1,2), range,int, range, range>();
test< permutation(0,2,1) ,permutation(0,3,1,2), range, range,int, range>();
test< permutation(0,1,2) ,permutation(0,3,1,2), range, range, range, int>();
test< permutation(0,3,1,2) ,permutation(0,3,1,2), range, range, range, range>();
test< 0 ,permutation(0,3,1,2), int, int, int, int> ();
std::cout << " ----------- custom order ------------- " << std::endl ;
std::cout << " ---- 0 int "<< std::endl ;
test< permutation(2,0,3,1) ,permutation(2,0,3,1), range, range, range, range>();
std::cout << " ---- 1 int "<< std::endl ;
test< permutation(1,2,0) ,permutation(2,0,3,1), int, range, range, range>();
test< permutation(1,0,2) ,permutation(2,0,3,1), range,int, range, range>();
test< permutation(0,2,1) ,permutation(2,0,3,1), range, range,int, range>();
test< permutation(2,0,1) ,permutation(2,0,3,1), range, range, range, int>();
std::cout << " ---- 2 int "<< std::endl ;
test< permutation(0,1) ,permutation(2,0,3,1), int, int, range, range>();
test< permutation(1,0) ,permutation(2,0,3,1), int, range,int, range>();
test< permutation(1,0) ,permutation(2,0,3,1), int, range,range, int>();
test< permutation(0,1) ,permutation(2,0,3,1), range,int, int, range>();
test< permutation(1,0) ,permutation(2,0,3,1), range,int, range, int>();
test< permutation(0,1) ,permutation(2,0,3,1), range, range,int, int>();
std::cout << " ---- 3 int "<< std::endl ;
test< permutation(0) ,permutation(2,0,3,1), range, int, int, int>();
test< permutation(0) ,permutation(2,0,3,1), int,range, int, int>();
test< permutation(0) ,permutation(2,0,3,1), int, int,range, int>();
test< permutation(0) ,permutation(2,0,3,1), int, int, int, range>();
std::cout << " ---- 4 int "<< std::endl ;
test< 0 ,permutation(2,0,3,1), int, int, int, int> ();
std::cout << " OK "<< std::endl ;
}