@@ -601,7 +601,7 @@ pragma(msg, __traits(getFunctionAttributes, (int x) @trusted { return x * 2; }))
601
601
$(H2 $(GNAME getLinkage))
602
602
603
603
$(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.
605
605
Returns a string representing the $(LINK2 attribute.html#LinkageAttribute, LinkageAttribute)
606
606
of the declaration.
607
607
The string is one of:
@@ -624,10 +624,12 @@ alias aliasc = fooc;
624
624
static assert(__traits(getLinkage, fooc) == "C");
625
625
static assert(__traits(getLinkage, aliasc) == "C");
626
626
627
- extern (C++) class FooCPP {}
627
+ extern (C++) struct FooCPPStruct {}
628
+ extern (C++) class FooCPPClass {}
628
629
extern (C++) interface FooCPPInterface {}
629
630
630
- static assert(__traits(getLinkage, FooCPP) == "C++");
631
+ static assert(__traits(getLinkage, FooCPPStruct) == "C++");
632
+ static assert(__traits(getLinkage, FooCPPClass) == "C++");
631
633
static assert(__traits(getLinkage, FooCPPInterface) == "C++");
632
634
---
633
635
0 commit comments