C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Only reason I don't use std::array

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Wed, 16 Aug 2023 18:07:52 -0400
On Wed, Aug 16, 2023 at 4:09 PM sasho648 via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> Not only that but if you use template deduction (at least on msvc) this:
>
> std::array arr = {
> something1,
> something2,
> something3,
> };
>
> also works.

That deduction guide has been there since C++17, so it's standard.
Assuming of course that all of those are of the same type.

Received on 2023-08-16 22:08:05