Sean Murthy · @smurthys
148 followers · 1710 posts · Server hachyderm.io

C programmers, please help me figure out something:

Since C23, a C enum may be declared to have a specific underlying type, as in the following example. My question is, how can I find the underlying type of such an enum? (C++11's std::underlying_type trait gets me this information.) 🙏

```C
enum Size : char { small, medium, large );
```

Code example in C++ and C: sigcpp.godbolt.org/z/eo7Tdqaeb

C enum: en.cppreference.com/w/c/langua

#question #c #programming #cpp #cplusplus #enumerations #enums

Last updated 1 year ago

droidcon · @droidcon
393 followers · 25 posts · Server androiddev.social

Moshi is one of the most popular parsing libraries on , but for DRY-loving has a weak point; .

droidcon.com/2022/11/22/solvin

#json #android #androiddevs #moshi #enumerations

Last updated 2 years ago

droidcon · @droidcon
393 followers · 25 posts · Server androiddev.social

Moshi is one of the most popular parsing libraries on , but for DRY-loving has a weak point; .

droidcon.com/2022/11/22/solvin

#json #android #androiddevs #moshi #enumerations

Last updated 2 years ago

gaby_wald · @gaby_wald
70 followers · 16246 posts · Server framapiaf.org
gaby_wald · @gaby_wald
74 followers · 16277 posts · Server framapiaf.org
gaby_wald · @gaby_wald
87 followers · 16402 posts · Server framapiaf.org