bigint implicit cast to bool breaks code

Paul D. Anderson nobody at hotmail.com
Thu May 30 15:32:07 PDT 2013


Issue 4120 added an implicit cast for BigInt to a boolean value.

This used to work:

/// Returns a mutable copy of a BigInt
public BigInt mutable(const BigInt num)
{
	BigInt big = cast(BigInt)num;
	return big;
}

But it now generates an error:

Error: template instance opCast!(BigInt) does not match template 
declaration opCast(T : bool)()

Is there another way to make a mutable copy of a BigInt?


More information about the Digitalmars-d mailing list