Negating a short?

Lance Bachmeier no at spam.net
Tue Nov 5 19:15:50 UTC 2024


On Tuesday, 5 November 2024 at 17:32:00 UTC, Andy Valencia wrote:
> I have a template which has a bit where it negates a value.  
> This works well until it encountered a short, where ldc2 
> complained:
>
> integral promotion not done for -val

My reading of the spec is that this should be legal: 
https://dlang.org/spec/type.html#integer-promotions


More information about the Digitalmars-d-learn mailing list