array_view: explicitly initialize constexpr function variables

This commit is contained in:
archshift 2015-11-02 11:47:14 -08:00
parent 74fba29c0f
commit b39571781e

View File

@ -541,7 +541,7 @@ namespace details
template <size_t Rank, typename ValueType, bool Enabled = (Rank > 1), typename Ret = std::enable_if_t<Enabled, index<Rank - 1, ValueType>>>
constexpr Ret shift_left(const index<Rank, ValueType>& other) noexcept
{
Ret ret;
Ret ret{};
for (size_t i = 0; i < Rank - 1; ++i)
{
ret[i] = other[i + 1];
@ -887,7 +887,7 @@ public:
constexpr bounds_iterator& operator+=(difference_type n) noexcept
{
auto linear_idx = linearize(curr) + n;
std::remove_const_t<value_type> stride;
std::remove_const_t<value_type> stride = 0;
stride[rank - 1] = 1;
for (size_t i = rank - 1; i-- > 0;)
{