C header file: tagged enumerations

Jesse Phillips via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Apr 28 16:49:40 PDT 2016


On Thursday, 28 April 2016 at 17:40:23 UTC, Jesse Phillips wrote:
> enum tagINSTALLMESSAGE
> {
> // 12 others ...
> 	INSTALLMESSAGE_INITIALIZE     ,
> 	INSTALLMESSAGE_TERMINATE      ,
> 	INSTALLMESSAGE_SHOWDIALOG     ,
> [greaterThan(500)]
> 	INSTALLMESSAGE_PERFORMANCE    ,
> [greaterThan(400)]
> 	INSTALLMESSAGE_RMFILESINUSE   ,
> [greaterThan(450)]
> 	INSTALLMESSAGE_INSTALLSTART   ,
> [greaterThan(450)]
> 	INSTALLMESSAGE_INSTALLEND     ,
> }
>
> mixin taggedEnum!tagINSTALLMESSAGE

FYI, that is a no since attributes can't be added to enumerations.

"Error: basic type expected, not @"


More information about the Digitalmars-d-learn mailing list