C++ Logo

std-proposals

Advanced search

Re: User-defined conversion for strongly typed enums

From: Zhihao Yuan <zy_at_[hidden]>
Date: Mon, 06 Apr 2020 18:35:59 +0000
I heard that you might want to come up
with rules to disallowing declaring certain
special member functions such as destructors.
Other than that, I'm not aware of any at this
point.

--
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
_______________________________________________
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, April 6, 2020 9:55 AM, Michael Hava via Std-Proposals <std-proposals_at_[hidden]> wrote:
> Gotta agree – is there a rationale why we don’t have those?
>
> From: Std-Proposals <std-proposals-bounces_at_[hidden]> On Behalf Of Zhihao Yuan via Std-Proposals
> Sent: Monday, April 6, 2020 5:03 AM
> To: std-proposals_at_[hidden]
> Cc: Zhihao Yuan <zy_at_[hidden]>
> Subject: Re: [std-proposals] User-defined conversion for strongly typed enums
>
> On Saturday, April 4, 2020 3:17 PM, Przemek Kozioł via Std-Proposals <std-proposals_at_[hidden]> wrote:
>
>> Strongly typed enums provide type safety.
>>
>> I believe, however, the programmer should have an option to define explicit conversions to the desired types.
>
> I believe enum class should support
>
> member functions.
>
> --
>
> Zhihao Yuan, ID lichray
> The best way to predict the future is to invent it.
> _______________________________________________

Received on 2020-04-06 13:40:10