[Issue 1778] Can not create pointer to class reference

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 16 02:27:57 PST 2008


http://d.puremagic.com/issues/show_bug.cgi?id=1778


bugzilla at digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Comment #1 from bugzilla at digitalmars.com  2008-01-16 04:27 -------
In general,
   new T;
will return a value of type T*, unless T is a reference type (i.e. a class or
an array), in which case it returns a value of type T.
Therefore,
   new T*;
will allocate a pointer to T, and return a value which points to that pointer
to T. In other words, a T**.

This is as designed.


-- 



More information about the Digitalmars-d-bugs mailing list