View source code
Display the source code in std/traits.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Alias std.traits.ImplicitConversionTargets

alias ImplicitConversionTargets(T) = AliasSeq!(byte,ubyte,short,ushort,int,uint,long,ulong,CentTypeList,float,double,real,char,wchar,dchar);


T The type to check


This template is considered out-dated. It will be removed from Phobos in 2.107.0. Please use AllImplicitConversionTargets instead.


An AliasSeq with all possible target types of an implicit conversion T.

If T is a class derived from Object, the result of TransitiveBaseTypeTuple is returned.

If the type is not a built-in value type or a class derived from Object, an empty AliasSeq is returned.


The possible targets are computed more conservatively than the language allows, eliminating all dangerous conversions. For example, ImplicitConversionTargets!double does not include float.

See Also



Walter Bright, Tomasz Stachowiak (isExpressions), Andrei Alexandrescu, Shin Fujishiro, Robert Clipsham, David Nadlinger, Kenji Hara, Shoichi Kato


Boost License 1.0.