@@ -387,13 +387,9 @@ namespace xt
387387 chunked_file_array (std::initializer_list<S> shape, std::initializer_list<S> chunk_shape, const std::string& path, std::size_t pool_size, layout_type chunk_memory_layout)
388388 {
389389 using sh_type = std::vector<std::size_t >;
390- sh_type sh = xtl::make_sequence<sh_type>(shape.size ());
391- std::copy (shape.begin (), shape.end (), sh.begin ());
392- sh_type ch_sh = xtl::make_sequence<sh_type>(chunk_shape.size ());
393- std::copy (chunk_shape.begin (), chunk_shape.end (), ch_sh.begin ());
394- using chunk_storage = xchunk_store_manager<xfile_array<T, IOH, L>, IP>;
395- chunk_storage chunks (sh, ch_sh, path, pool_size, chunk_memory_layout);
396- return xchunked_array<chunk_storage, EXT>(std::move (chunks), std::move (sh), std::move (ch_sh));
390+ auto sh = xtl::forward_sequence<sh_type, std::initializer_list<S>>(shape);
391+ auto ch_sh = xtl::forward_sequence<sh_type, std::initializer_list<S>>(chunk_shape);
392+ return chunked_file_array<T, IOH, L, IP, EXT, sh_type>(std::move (sh), std::move (ch_sh), path, pool_size, chunk_memory_layout);
397393 }
398394
399395 template <class T , class IOH , layout_type L, class IP , class EXT , class S >
@@ -410,13 +406,9 @@ namespace xt
410406 chunked_file_array (std::initializer_list<S> shape, std::initializer_list<S> chunk_shape, const std::string& path, const T& init_value, std::size_t pool_size, layout_type chunk_memory_layout)
411407 {
412408 using sh_type = std::vector<std::size_t >;
413- sh_type sh = xtl::make_sequence<sh_type>(shape.size ());
414- std::copy (shape.begin (), shape.end (), sh.begin ());
415- sh_type ch_sh = xtl::make_sequence<sh_type>(chunk_shape.size ());
416- std::copy (chunk_shape.begin (), chunk_shape.end (), ch_sh.begin ());
417- using chunk_storage = xchunk_store_manager<xfile_array<T, IOH, L>, IP>;
418- chunk_storage chunks (sh, ch_sh, path, pool_size, init_value, chunk_memory_layout);
419- return xchunked_array<chunk_storage, EXT>(std::move (chunks), std::move (sh), std::move (ch_sh));
409+ auto sh = xtl::forward_sequence<sh_type, std::initializer_list<S>>(shape);
410+ auto ch_sh = xtl::forward_sequence<sh_type, std::initializer_list<S>>(chunk_shape);
411+ return chunked_file_array<T, IOH, L, IP, EXT, sh_type>(std::move (sh), std::move (ch_sh), path, init_value, pool_size, chunk_memory_layout);
420412 }
421413
422414 template <class IOH , layout_type L, class IP , class EXT , class E , class S >
0 commit comments