A strange div bug on Linux x86_64, (both dmd & ldc2): long -5000 / size_t 2 = 9223372036854773308
    H. S. Teoh 
    hsteoh at quickfur.ath.cx
       
    Fri Aug 14 02:28:13 UTC 2020
    
    
  
On Fri, Aug 14, 2020 at 02:10:20AM +0000, mw via Digitalmars-d wrote:
[...]
> currently, there is a compile error
> Error: template std.experimental.checkedint.Checked!(long,
> Abort).Checked.__ctor cannot deduce function from argument types
> !()(Checked!(ulong, Abort))
> 
> have to re-write it as:
> ```
>   Long c = sum(a);
>   c /= a.length;
> ```
Try writing it as:
	auto x = Long(sum(a) / a.length);
T
-- 
He who sacrifices functionality for ease of use, loses both and deserves neither. -- Slashdotter
    
    
More information about the Digitalmars-d
mailing list