Casting away const

Steven Schveighoffer schveiguy at yahoo.com
Mon Aug 9 08:17:34 PDT 2010


On Mon, 09 Aug 2010 11:15:38 -0400, bearophile <bearophileHUGS at lycos.com>  
wrote:

> Steven Schveighoffer:
>> extern(C) int strlen(const(char)* str);
>
> C has no const(char)* so I am now thinking about a possible D2  
> diagnostic enhancement request that turns that line of code into a  
> compile time error :-)

But an extern(C) function does not have to be written in C :)

-Steve


More information about the Digitalmars-d-learn mailing list