C++ Logo

std-proposals

Advanced search

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

From: Bo Persson <bo_at_[hidden]>
Date: Tue, 11 Jun 2024 17:00:41 +0200
On 2024-06-11 at 16:21, Frederick Virchanza Gotham via Std-Proposals wrote:

> The idea of marking a class as 'explicit' is just to make it very
> restrictive in many ways.

So why not an attribute [[restrictive]], or perhaps [[weird]] ?

class Dog [[restrictive]]
{

};


We can then add [[very_restrictive]] when we find new things to
restrict, like having all member variables at the end, and in
alphabetical order.

Received on 2024-06-11 15:00:52