View source code
Display the source code in core/attribute.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Module core.attribute

This module contains UDA's (User Defined Attributes) either used in the runtime or special UDA's recognized by compiler.


gnuAbiTag Use this attribute to declare an ABI tag on a C++ symbol.
selector Use this attribute to attach an Objective-C selector to a method.


mustuse Use this attribute to ensure that values of a struct or union type are not discarded.
optional Use this attribute to make an Objective-C interface method optional.
standalone Use this attribute to indicate that a shared module constructor does not depend on any other module constructor being run first. This avoids errors on cyclic module constructors.
weak Use this attribute to specify that a global symbol should be emitted with weak linkage. This is primarily useful in defining library functions that can be overridden by user code, though it can also be used with shared and static variables too.


Jacob Carlborg


Boost License 1.0