@@ -230,11 +230,11 @@ namespace xt
230230 template <layout_type L = XTENSOR_DEFAULT_LAYOUT, class C , class SC ,
231231 XTL_REQUIRES (detail::has_fixed_size<std::decay_t <SC>>,
232232 detail::not_a_pointer<std::remove_reference_t <C>>)>
233- inline xtensor_adaptor<C, std::tuple_size <std::decay_t<SC>>::value, L>
233+ inline xtensor_adaptor<C, detail::get_fixed_size <std::decay_t<SC>>::value, L>
234234 adapt(C&& container, const SC& shape, layout_type l = L)
235235 {
236236 static_assert (!xtl::is_integral<SC>::value, " shape cannot be a integer" );
237- constexpr std::size_t N = std::tuple_size <std::decay_t <SC>>::value;
237+ constexpr std::size_t N = detail::get_fixed_size <std::decay_t <SC>>::value;
238238 using return_type = xtensor_adaptor<xtl::closure_type_t <C>, N, L>;
239239 return return_type (std::forward<C>(container), shape, l);
240240 }
@@ -252,7 +252,7 @@ namespace xt
252252 {
253253 static_assert (!xtl::is_integral<SC>::value, " shape cannot be a integer" );
254254 using buffer_type = xbuffer_adaptor<C, xt::no_ownership, detail::default_allocator_for_ptr_t <C>>;
255- constexpr std::size_t N = std::tuple_size <std::decay_t <SC>>::value;
255+ constexpr std::size_t N = detail::get_fixed_size <std::decay_t <SC>>::value;
256256 using return_type = xtensor_adaptor<buffer_type, N, L>;
257257 return return_type (buffer_type (pointer, compute_size (shape)), shape, l);
258258 }
@@ -267,11 +267,11 @@ namespace xt
267267 template <class C , class SC , class SS ,
268268 XTL_REQUIRES (detail::has_fixed_size<std::decay_t <SC>>,
269269 detail::not_a_layout<std::decay_t <SS>>)>
270- inline xtensor_adaptor<C, std::tuple_size <std::decay_t<SC>>::value, layout_type::dynamic>
270+ inline xtensor_adaptor<C, detail::get_fixed_size <std::decay_t<SC>>::value, layout_type::dynamic>
271271 adapt(C&& container, SC&& shape, SS&& strides)
272272 {
273273 static_assert (!xtl::is_integral<std::decay_t <SC>>::value, " shape cannot be a integer" );
274- constexpr std::size_t N = std::tuple_size <std::decay_t <SC>>::value;
274+ constexpr std::size_t N = detail::get_fixed_size <std::decay_t <SC>>::value;
275275 using return_type = xtensor_adaptor<xtl::closure_type_t <C>, N, layout_type::dynamic>;
276276 return return_type (std::forward<C>(container),
277277 xtl::forward_sequence<typename return_type::inner_shape_type, SC>(shape),
@@ -313,13 +313,13 @@ namespace xt
313313 */
314314 template <layout_type L = XTENSOR_DEFAULT_LAYOUT, class P , class O , class SC , class A = detail::default_allocator_for_ptr_t <P>,
315315 XTL_REQUIRES (detail::has_fixed_size<std::decay_t <SC>>)>
316- inline xtensor_adaptor<xbuffer_adaptor<xtl::closure_type_t<P>, O, A>, std::tuple_size <std::decay_t<SC>>::value, L>
316+ inline xtensor_adaptor<xbuffer_adaptor<xtl::closure_type_t<P>, O, A>, detail::get_fixed_size <std::decay_t<SC>>::value, L>
317317 adapt(P&& pointer, typename A::size_type size, O ownership, const SC& shape, layout_type l = L, const A& alloc = A())
318318 {
319319 static_assert (!xtl::is_integral<SC>::value, " shape cannot be a integer" );
320320 (void )ownership;
321321 using buffer_type = xbuffer_adaptor<xtl::closure_type_t <P>, O, A>;
322- constexpr std::size_t N = std::tuple_size <std::decay_t <SC>>::value;
322+ constexpr std::size_t N = detail::get_fixed_size <std::decay_t <SC>>::value;
323323 using return_type = xtensor_adaptor<buffer_type, N, L>;
324324 buffer_type buf (std::forward<P>(pointer), size, alloc);
325325 return return_type (std::move (buf), shape, l);
@@ -339,13 +339,13 @@ namespace xt
339339 template <class P , class O , class SC , class SS , class A = detail::default_allocator_for_ptr_t <P>,
340340 XTL_REQUIRES (detail::has_fixed_size<std::decay_t <SC>>,
341341 detail::not_a_layout<std::decay_t <SS>>)>
342- inline xtensor_adaptor<xbuffer_adaptor<xtl::closure_type_t<P>, O, A>, std::tuple_size <std::decay_t<SC>>::value, layout_type::dynamic>
342+ inline xtensor_adaptor<xbuffer_adaptor<xtl::closure_type_t<P>, O, A>, detail::get_fixed_size <std::decay_t<SC>>::value, layout_type::dynamic>
343343 adapt(P&& pointer, typename A::size_type size, O ownership, SC&& shape, SS&& strides, const A& alloc = A())
344344 {
345345 static_assert (!xtl::is_integral<std::decay_t <SC>>::value, " shape cannot be a integer" );
346346 (void )ownership;
347347 using buffer_type = xbuffer_adaptor<xtl::closure_type_t <P>, O, A>;
348- constexpr std::size_t N = std::tuple_size <std::decay_t <SC>>::value;
348+ constexpr std::size_t N = detail::get_fixed_size <std::decay_t <SC>>::value;
349349 using return_type = xtensor_adaptor<buffer_type, N, layout_type::dynamic>;
350350 buffer_type buf (std::forward<P>(pointer), size, alloc);
351351 return return_type (std::move (buf),
0 commit comments