Can Scope Be Used for Anonymous Objects?
    Ali Çehreli 
    acehreli at yahoo.com
       
    Wed Oct 17 21:18:47 UTC 2018
    
    
  
On 10/17/2018 01:53 PM, Vijay Nayar wrote:
 > https://dlang.org/spec/expression.html#new_expressions
 >
 >      If a NewExpression is used as an initializer for a function local
 > variable with
 >      scope storage class, and the ArgumentList to new is empty, then the
 > instance is
 >      allocated on the stack rather than the heap or using the class
 > specific allocator.
I did not know that. It looks like it's a feature for classes only.
Ali
    
    
More information about the Digitalmars-d-learn
mailing list