Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions include/xtensor/xarray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,8 @@ namespace xt
: base_type()
{
base_type::resize(xt::shape<shape_type>(t));
L == layout_type::row_major ? nested_copy(m_storage.begin(), t) : nested_copy(this->template begin<layout_type::row_major>(), t);
constexpr auto tmp = layout_type::row_major;
L == tmp ? nested_copy(m_storage.begin(), t) : nested_copy(this->template begin<tmp>(), t);
}

/**
Expand All @@ -389,7 +390,8 @@ namespace xt
: base_type()
{
base_type::resize(xt::shape<shape_type>(t));
L == layout_type::row_major ? nested_copy(m_storage.begin(), t) : nested_copy(this->template begin<layout_type::row_major>(), t);
constexpr auto tmp = layout_type::row_major;
L == tmp ? nested_copy(m_storage.begin(), t) : nested_copy(this->template begin<tmp>(), t);
}

/**
Expand All @@ -401,7 +403,8 @@ namespace xt
: base_type()
{
base_type::resize(xt::shape<shape_type>(t));
L == layout_type::row_major ? nested_copy(m_storage.begin(), t) : nested_copy(this->template begin<layout_type::row_major>(), t);
constexpr auto tmp = layout_type::row_major;
L == tmp ? nested_copy(m_storage.begin(), t) : nested_copy(this->template begin<tmp>(), t);
}

/**
Expand All @@ -413,7 +416,8 @@ namespace xt
: base_type()
{
base_type::resize(xt::shape<shape_type>(t));
L == layout_type::row_major ? nested_copy(m_storage.begin(), t) : nested_copy(this->template begin<layout_type::row_major>(), t);
constexpr auto tmp = layout_type::row_major;
L == tmp ? nested_copy(m_storage.begin(), t) : nested_copy(this->template begin<tmp>(), t);
}

/**
Expand All @@ -425,7 +429,8 @@ namespace xt
: base_type()
{
base_type::resize(xt::shape<shape_type>(t));
L == layout_type::row_major ? nested_copy(m_storage.begin(), t) : nested_copy(this->template begin<layout_type::row_major>(), t);
constexpr auto tmp = layout_type::row_major;
L == tmp ? nested_copy(m_storage.begin(), t) : nested_copy(this->template begin<tmp>(), t);
}
//@}

Expand Down
3 changes: 2 additions & 1 deletion include/xtensor/xfixed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,8 @@ namespace xt
inline xfixed_container<ET, S, L, SH, Tag>::xfixed_container(nested_initializer_list_t<value_type, N> t)
{
XTENSOR_ASSERT_MSG(detail::check_initializer_list_shape<N>::run(t, this->shape()) == true, "initializer list shape does not match fixed shape");
L == layout_type::row_major ? nested_copy(m_storage.begin(), t) : nested_copy(this->template begin<layout_type::row_major>(), t);
constexpr auto tmp = layout_type::row_major;
L == tmp ? nested_copy(m_storage.begin(), t) : nested_copy(this->template begin<tmp>(), t);
}
//@}

Expand Down
3 changes: 2 additions & 1 deletion include/xtensor/xtensor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,8 @@ namespace xt
: base_type()
{
base_type::resize(xt::shape<shape_type>(t), true);
L == layout_type::row_major ? nested_copy(m_storage.begin(), t) : nested_copy(this->template begin<layout_type::row_major>(), t);
constexpr auto tmp = layout_type::row_major;
L == tmp ? nested_copy(m_storage.begin(), t) : nested_copy(this->template begin<tmp>(), t);
}

/**
Expand Down