the enum type to convert to
the lvalue of the range to parse
the flag for deciding to report the number of consumed characters
A ConvException if type Target does not have a member represented by s.
import std.typecons : Flag, Yes, No, tuple; enum EnumType : bool { a = true, b = false, c = a } auto str = "a"; assert(parse!EnumType(str) == EnumType.a); auto str2 = "a"; assert(parse!(EnumType, string, No.doCount)(str2) == EnumType.a); auto str3 = "a"; assert(parse!(EnumType, string, Yes.doCount)(str3) == tuple(EnumType.a, 1));
Parses an enum type from a string representing an enum member name.