http://d.puremagic.com/issues/show_bug.cgi?id=5837
Summary: Unable to format (writeln) an enum based on bool Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: kenn...@gmail.com --- Comment #0 from kenn...@gmail.com 2011-04-11 14:07:08 PDT --- Test program: ---------------- import std.stdio; enum A : bool { no, yes } void main () { writeln(A.no); } ---------------- This results in an error: /usr/include/phobos/std/format.d(1599): Error: template std.format.formatValue(Writer,T,Char) if (is(const(T) == const(void[]))) formatValue(Writer,T,Char) if (is(const(T) == const(void[]))) matches more than one template declaration, /usr/include/phobos/std/format.d(868):formatValue(Writer,T,Char) if (is(T == enum)) and /usr/include/phobos/std/format.d(1079):formatValue(Writer,T,Char) if (is(T : bool)) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------