Skip to content

Commit 7c70747

Browse files
committed
Update linkdef instructions about enums.
1 parent 78cd78b commit 7c70747

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

manual/io_custom_classes/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ Here is an example linkdef file:
158158
#pragma link C++ nestedtypedefs;
159159
#pragma link C++ class MyClass+;
160160
#pragma link C++ namespace Some::Nested::Namespace;
161+
#pragma link C++ enum myEnum;
161162
#endif
162163
{% endhighlight %}
163164

@@ -175,15 +176,15 @@ public:
175176
};
176177
{% endhighlight %}
177178

178-
The namespace directive instructs `rootcling` to include every type in the selected namespace in the dictionary.
179+
The namespace directive instructs `rootcling` to include every type in the selected namespace in the dictionary. The enum directive includes the enumerator `myEnum`, which becomes known to ROOT's typesystem before parsing the corresponding headers, for example to for autoloading the library where it is defined.
179180

180181
> **Note**
181182
>
182183
> The `+` after the class name enables extra features and performance improvements in the I/O of the type. Remember to always add it to your linkdef directives.
183184
184185
> **Note**
185186
>
186-
> In the past, linkdef files also contained directives for global variables, functions and enums: these directives are ignored since ROOT version 6.
187+
> In the past, linkdef files also contained directives for global variables and functions: these directives are ignored since ROOT version 6.
187188
188189
### Selection by file name
189190

0 commit comments

Comments
 (0)