CommonType and non-built-in types
ilya-stromberg
ilya-stromberg-2009 at yandex.ru
Tue Oct 1 11:28:42 PDT 2013
On Tuesday, 1 October 2013 at 17:56:17 UTC, Dicebot wrote:
> Definition of common type is pretty simple - it is a type both
> types can be implicitly converted to. For `int` and `BigInt`
> common type should be `BigInt` if it was possible to define
> that implicit conversion. AFAIK it is not possible and thus
> they can't have common type.
Yes, we need implicit conversion support for usage cases like
this.
May be only from build-in types to the user-defined as you said
before, but it will be really useful.
I really don't know any usage example for implicit conversion
from `int` to `BigInt` when it produces problems.
More information about the Digitalmars-d-learn
mailing list