C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] std::underlying_value
From: JeanHeyd Meneide (phdofthehouse_at_[hidden])
Date: 2019-10-20 06:28:01


Dear Gokhan,

On Sun, Oct 20, 2019 at 6:49 AM Kosher Yosher via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> Hi,
>
> With C++11 we have std::underlying_type to get the integer type of an enum class. It feels like we should add the complementing std::underlying_value function to get the integer value for an enum class value.
>
> I would suggest the following constexpr to get this value:

     https://thephd.github.io/vendor/future_cxx/papers/d1379.html

     https://github.com/ThePhD/future_cxx/issues/7

     I'm on top of it. :D

Sincerely,
ThePhD


STD-PROPOSALS list run by std-proposals-owner@lists.isocpp.org

Standard Proposals Archives on Google Groups