Where can I find a "special hack"?
thanks.
(2012/01/13 21:58), Don Clugston wrote:
> On 13/01/12 10:01, k2 wrote:
>> When replace typedef to enum, it became impossible to compile a certain
>> portion.
>>
>> dmd v2.057 Windows
>>
>> enum HANDLE : void*
Don Clugston wrote:
> On 13/01/12 10:01, k2 wrote:
>> When replace typedef to enum, it became impossible to compile a certain
>> portion.
>>
>> dmd v2.057 Windows
>>
>> enum HANDLE : void* {init = (void*).init}
>>
>> pure HANDLE int_to_HANDLE(int x)
>> {
On 13/01/12 10:01, k2 wrote:
> When replace typedef to enum, it became impossible to compile a certain
> portion.
>
> dmd v2.057 Windows
>
> enum HANDLE : void* {init = (void*).init}
>
> pure HANDLE int_to_HANDLE(int x)
> {
> return cast(HANDLE)x;
When replace typedef to enum, it became impossible to compile a certain
portion.
dmd v2.057 Windows
enum HANDLE : void* {init = (void*).init}
pure HANDLE int_to_HANDLE(int x)
{
return cast(HANDLE)x;
}
void bar()
{
HANDLE a = cast(HANDLE)1;// o