------------------------- import std.conv: to; enum Enum { oops } "foo".to!(const Enum); // doesn't compile -------------------------
@atilaneves created dlang/phobos pull request #7464 "Fix issue 20782 - allow std.conv.to to convert string to const enum" fixing this issue: - Fix issue 20782 - allow std.conv.to to convert string to const enum The commit allows the following code to compile: ------------------------ enum Enum { oops } "foo".to!(const Enum); ------------------------ https://github.com/dlang/phobos/pull/7464
dlang/phobos pull request #7464 "Fix issue 20782 - allow std.conv.to to convert string to const enum" was merged into master: - 46933cf73ed7a127c4657f418280938e3d1bbd80 by Atila Neves: Fix issue 20782 - allow std.conv.to to convert string to const enum The commit allows the following code to compile: ------------------------ enum Enum { oops } "foo".to!(const Enum); ------------------------ https://github.com/dlang/phobos/pull/7464