DMD 0.177 release

Pragma ericanderton at yahoo.removeme.com
Mon Dec 11 07:18:05 PST 2006


Chris Miller wrote:
> 
> char* p = new char[32];
> 
> Error: cannot implicitly convert expression (new char[](32)) of type 
> char[] to char*
> 
> Should this be a special case? Currently it needs  (new char[32]).ptr

Well, the problem is that since this change, char[] is not the same 
thing as char*; IMO, this is a good thing.  You really should have to 
jump through an extra hoop to get there, because they're not the same. 
It's no different than a cast, if it is a little harder to type.

-- 
- EricAnderton at yahoo



More information about the Digitalmars-d-announce mailing list