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 03:02:59 +0000
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-05 22:06:01