Skip to content

Commit

Permalink
Add note about POD compatibility of function-nested structs.
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrejMitrovic committed Nov 7, 2012
1 parent bf85703 commit a4f8600
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion struct.dd
Expand Up @@ -3,7 +3,9 @@ Ddoc
$(SPEC_S Structs & Unions,

$(P Whereas classes are reference types, structs are value types.
Any C struct can be exactly represented as a D struct.
Any C struct can be exactly represented as a D struct, except non-static
$(LINK2 #nested, function-nested D structs) which access the context of
their enclosing scope.
In C++ parlance, a D struct is a
$(DPLLINK glossary.html#pod, POD (Plain Old Data)) type,
with a trivial constructor and destructor.
Expand Down

0 comments on commit a4f8600

Please sign in to comment.