@@ -2920,15 +2920,18 @@ $(H3 $(LNAME2 new_expressions, New Expressions))
2920
2920
2921
2921
$(GRAMMAR
2922
2922
$(GNAME NewExpression):
2923
- $(D new) $(GLINK2 type, Type)
2924
- $(D new) $(GLINK2 type, Type) $(D [) $(GLINK AssignExpression) $(D ])
2925
- $(D new) $(GLINK2 type, Type) $(D $(LPAREN)) $(GLINK NamedArgumentList)$(OPT) $(D $(RPAREN))
2923
+ $(D new) $(GLINK PlacementExpression)$(OPT) $( GLINK2 type, Type)
2924
+ $(D new) $(GLINK PlacementExpression)$(OPT) $( GLINK2 type, Type) $(D [) $(GLINK AssignExpression) $(D ])
2925
+ $(D new) $(GLINK PlacementExpression)$(OPT) $( GLINK2 type, Type) $(D $(LPAREN)) $(GLINK NamedArgumentList)$(OPT) $(D $(RPAREN))
2926
2926
$(GLINK2 class, NewAnonClassExpression)
2927
+
2928
+ $(GNAME PlacementExpression):
2929
+ $(LPAREN) $(GLINK AssignExpression) $(RPAREN)
2927
2930
)
2928
2931
2929
2932
$(P $(I NewExpression)s allocate memory on the
2930
2933
$(DDLINK spec/garbage, Garbage Collection, garbage
2931
- collected) heap by default .
2934
+ collected) heap unless there is a $(RELATIVE_LINK2 PlacementExpression, PlacementExpression) .
2932
2935
)
2933
2936
2934
2937
$(P `new T` constructs an instance of type `T` and default-initializes it.
@@ -3037,6 +3040,8 @@ $(H4 $(LNAME2 new_multidimensional, Multidimensional Arrays))
3037
3040
}
3038
3041
-----------
3039
3042
3043
+ $(H4 $(LNAME2 PlacementExpression, Placement Expression))
3044
+
3040
3045
$(H3 $(LNAME2 typeid_expressions, Typeid Expressions))
3041
3046
3042
3047
$(GRAMMAR
0 commit comments