diff --git a/doc/OptInFeatures.md b/doc/OptInFeatures.md index d89a491..d2aa3c4 100644 --- a/doc/OptInFeatures.md +++ b/doc/OptInFeatures.md @@ -88,3 +88,15 @@ Here they are: %% description = Optional Better Enums features, disabled by default for performance or compatibility reasons. + +### Injecting tokens + +You can define `BETTER_ENUMS_CLASS_ATTRIBUTE` before declaring a Better Enum, to +inject tokens into the class declaration. For example, in + + #define BETTER_ENUMS_CLASS_ATTRIBUTE __attribute__(foo) + BETTER_ENUM(Channel, int, Red, Green, Blue) + +The resulting enum declaration will begin with + + class __attribute__(foo) Channel {