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.

Enum core.attribute.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.

enum standalone : void { ... }

However, it is now up to the user to enforce safety. The module constructor must be marked @system as a result. Prefer to refactor the module constructor causing the cycle so it's in its own module if possible.

This is only allowed on shared static constructors, not thread-local module constructors.

Enum members

NameDescription

Authors

Jacob Carlborg

License

Boost License 1.0