C++ Logo


Advanced search

Re: objects with no lifetime for validation

From: Jens Maurer <jens.maurer_at_[hidden]>
Date: Sat, 27 May 2023 07:56:54 +0200
On 27/05/2023 07.36, Federico Kircheis via Std-Discussion wrote:
> Creating a view_data like
> struct data_view{
> span<string_view> otherdata;
> }
> wont work, as span<string_view> cannot point to vector<string>

But a vector<string_view> can point to the individual elements
of a vector<string>.

> It just came to my mind that it would be possible to misuse volatile

Please, no.


Received on 2023-05-27 05:56:59