File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ $(GNAME TraitsKeyword):
31
31
$(GBLINK isScalar)
32
32
$(GBLINK isStaticArray)
33
33
$(GBLINK isUnsigned)
34
+ $(GBLINK isDisabled)
34
35
$(GBLINK isVirtualFunction)
35
36
$(GBLINK isVirtualMethod)
36
37
$(GBLINK isAbstractFunction)
@@ -207,6 +208,31 @@ $(H2 $(GNAME isDeprecated))
207
208
$(P Takes one argument. It returns `true` if the argument is a symbol
208
209
marked with the `deprecated` keyword, otherwise `false`.)
209
210
211
+ $(H2 $(GNAME isDisabled))
212
+
213
+ $(P Takes one argument and returns `true` if it's a function declaration
214
+ marked with `@disable`.)
215
+
216
+ ---
217
+ struct Foo
218
+ {
219
+ @disable void foo();
220
+ void bar(){}
221
+ }
222
+
223
+ static assert(__traits(isDisabled, Foo.foo));
224
+ static assert(!__traits(isDisabled, Foo.bar));
225
+ ---
226
+
227
+ $(P For any other declaration even if `@disable` is a syntactically valid
228
+ attribute `false` is returned because the annotation has no effect.)
229
+
230
+ ---
231
+ @disable struct Bar{}
232
+
233
+ static assert(!__traits(isDisabled, Bar));
234
+ ---
235
+
210
236
$(H2 $(GNAME isVirtualFunction))
211
237
212
238
$(P The same as $(GLINK isVirtualMethod), except
You can’t perform that action at this time.
0 commit comments