C++ Logo

std-proposals

Advanced search

Re: User-defined conversion for strongly typed enums

From: Michael Hava <mfh_at_[hidden]>
Date: Mon, 6 Apr 2020 14:55:18 +0000
Gotta agree – is there a rationale why we don’t have those?

From: Std-Proposals <std-proposals-bounces_at_lists.isocpp.org> On Behalf Of Zhihao Yuan via Std-Proposals
Sent: Monday, April 6, 2020 5:03 AM
To: std-proposals_at_lists.isocpp.org
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]<mailto: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 09:58:47