C++ Logo

std-proposals

Advanced search

Re: [std-proposals] C-style array specialization for std::get

From: Zhihao Yuan <zy_at_[hidden]>
Date: Fri, 04 Mar 2022 18:30:14 +0000
On Friday, March 4th, 2022 at 9:06 AM, Paolo Di Giglio via Std-Proposals <std-proposals_at_[hidden]> wrote:

> I’m not really sure whether this is an issue, since the return type of `std::move(arr)[Idx]` itself is not consistent across compilers.

You can (and should) std::move(arr[Idx]).

See also: std::to_array - cppreference.com

--
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
_______________________________________________

Received on 2022-03-04 18:30:19