-------- Original Message --------
On Nov 22, 2019, 8:55 AM, S.G via D.gnu < d.gnu@puremagic.com> wrote:
Hello, I've seen that many D enum are still typed as int because
of the c++ headers but c++11 allow things like
enum Stuff: unsigned char { ... }
Is is ok to use this in the headers ?

The baseline bootstrapping compiler is C++98.

You don't have to type D enums as int, but the base type must be used 
explicitly if you want to use them as parameters or fields, which defeats some 
purposes of having the enum in the first place.

Work on autogenerating C++ headers should render this mostly redundant (people 
want freedom to pick their std version), apart from the not being able to use 
these enums as parameters due to ABI/mangling incompatibilities.

--
Iain

Reply via email to