Skip to content

Commit 4386eac

Browse files
authored
Merge pull request #2383 from RazvanN7/patch-11
Update traits.dd
2 parents 3c6f2bf + df6def8 commit 4386eac

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

spec/traits.dd

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ pragma(msg, __traits(getFunctionAttributes, (int x) @trusted { return x * 2; }))
601601
$(H2 $(GNAME getLinkage))
602602

603603
$(P Takes one argument, which is a declaration symbol, or the type of a function, delegate,
604-
pointer to function, class, or interface.
604+
pointer to function, struct, class, or interface.
605605
Returns a string representing the $(LINK2 attribute.html#LinkageAttribute, LinkageAttribute)
606606
of the declaration.
607607
The string is one of:
@@ -624,10 +624,12 @@ alias aliasc = fooc;
624624
static assert(__traits(getLinkage, fooc) == "C");
625625
static assert(__traits(getLinkage, aliasc) == "C");
626626

627-
extern (C++) class FooCPP {}
627+
extern (C++) struct FooCPPStruct {}
628+
extern (C++) class FooCPPClass {}
628629
extern (C++) interface FooCPPInterface {}
629630

630-
static assert(__traits(getLinkage, FooCPP) == "C++");
631+
static assert(__traits(getLinkage, FooCPPStruct) == "C++");
632+
static assert(__traits(getLinkage, FooCPPClass) == "C++");
631633
static assert(__traits(getLinkage, FooCPPInterface) == "C++");
632634
---
633635

0 commit comments

Comments
 (0)