Jonathan Bromley wrote: >>> c = D::new(); >>> Is there any fundamental problem with this that I've missed? >> I don't have too much concern over this. > > But I had not thought about Dave Rich's point: >> [DR] Except that the "this" handle is not available >> in static methods, and needs to be available in a constructor. This is actually directly the cause of my comment about allocation and construction already being intertwined. The fact that a class type prefix could be used with "new" is just another bit of special handling that "new" already requires. Since "new" is a keyword and not just a method name, it is not a big deal to slightly overload the meaning of "::" to mean "allocated based on the type prefix instead of the type of the target". Gord. -- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Jun 25 11:12:08 2008
This archive was generated by hypermail 2.1.8 : Wed Jun 25 2008 - 11:12:18 PDT