C++ Logo

std-proposals

Advanced search

Re: [std-proposals] explicit class (2023, 2019, 2004, 2002)

From: Thiago Macieira <thiago_at_[hidden]>
Date: Wed, 12 Jun 2024 07:08:15 -0700
On Wednesday 12 June 2024 02:38:50 GMT-7 Frederick Virchanza Gotham via Std-
Proposals wrote:
> Also another new restriction I would like is demonstrated in the
> following program:
>
> struct monkey {};
>
> int monkey;
>
> int main(void)
> {
> monkey = 5;
> }
>
> It was a really really really bad idea back in the 1970's to allow C
> to give a struct the same name as a variable. I would like to see this
> deprecated in C++26, and made a compiler error in either C++29 to
> C++32.

How do you propose we fix POSIX stat() and struct stat by C++29?

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel DCAI Fleet Systems Engineering

Received on 2024-06-12 14:08:21