classes allocated on the stack
Steven Schveighoffer
schveiguy at yahoo.com
Thu Apr 24 19:19:10 PDT 2008
"Frits van Bommel" wrote
> Steven Schveighoffer wrote:
>> * use new with no arguments
> [snip]
>> Why does rule 3 exist? If I have a class:
> [snip]
>>
>> What about using the constructor with parameters makes it not possible to
>> store on the stack?
>
> "New with arguments" != "constructor with parameters". I think you missed
> this part of the spec:
> <http://www.digitalmars.com/d/1.0/class.html#ClassAllocator>
Ah yes, I hadn't thought of it meaning that. Another case of the example
not being explicit enough :) It would be nice if the counter example (with
an example of new with arguments) was listed. I'll post an enhancement
report.
Thanks!
-Steve
More information about the Digitalmars-d-learn
mailing list