http://d.puremagic.com/issues/show_bug.cgi?id=5515
--- Comment #4 from bearophile_h...@eml.cc 2013-02-17 16:33:03 PST --- But probably this should be supported: import std.conv: to; enum Foo : char { A = 'a' } void main() { dchar d = 'a'; Foo f = to!Foo(d); } Currently it gives: ...\dmd2\src\phobos\std\conv.d(274): Error: template std.conv.toImpl does not match any function template declaration. Candidates are: ... It's useful when you want to write (the argument of this map is a dchar): import std.conv: to; import std.algorithm: map; enum Foo : char { A='a', B='b', C='c' } void main() { auto foos = "abcabcabc".map!(to!Foo)(); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------