Bit operator conversions

Sergey Gromov snake.scaly at gmail.com
Tue Apr 7 07:48:02 PDT 2009


Mon, 06 Apr 2009 08:53:41 -0400, Kagamin wrote:

> Is it valid for this to compile:
> ---
> ushort a(ushort b) pure nothrow
> 	{ return b<<10|b; }
> ---
> 
> And for this to not compile:
> ---
> ushort a(ushort b) pure nothrow
> 	{ return b<<10; }
> ---
> ?

They both compile with 2.026.  What's your problem?


More information about the Digitalmars-d-learn mailing list