mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
array_view: explicitly initialize constexpr function variables
This commit is contained in:
parent
74fba29c0f
commit
b39571781e
@ -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;)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user