C++ Logo


Advanced search

Subject: Re: [std-proposals] Fixing C-style arrays
From: Ryan Nicholl (rnicholl_at_[hidden])
Date: 2020-03-12 17:06:49

We have std::array for this purpose, so that compatibility with C is not broken.

-------- Original Message --------
On Mar 12, 2020, 17:40, Maciej Cencora via Std-Proposals wrote:

> Hi,
> I propose to deprecate in C++23:
> 1) mixed pointer and array comparisons:
> int a[2]; int b[2];
> a == &b[0];
> 2) array decl in func parameters:
> void foo(int a[2]);
> In order to make C-style arrays behave like other aggregate types in C++26 or later (supported assignments, comparisons, passing and returning from functions)
> Regards,
> Maciej

STD-PROPOSALS list run by herb.sutter at gmail.com

Standard Proposals Archives on Google Groups