C++ Logo


Advanced search

Re: [std-proposals] Subscript aliasing

From: Jan Schultke <janschultke_at_[hidden]>
Date: Fri, 8 Mar 2024 16:08:21 +0100
It's not safe to access my_vec[1] or my_vec[2]. This would be
accessing elements past the end of the array, which is undefined

It doesn't matter that there happen to be floats in memory in that
location (y, z); my_vec[i] is limited accessing elements within that

Received on 2024-03-08 15:08:33