Thread overview | ||||||
---|---|---|---|---|---|---|
|
December 13, 2010 [Issue 5346] New: instantiation of std.conv.toImpl and std.format.formatValue fails for unions | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=5346 Summary: instantiation of std.conv.toImpl and std.format.formatValue fails for unions Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody@puremagic.com ReportedBy: elfy.nv@gmail.com --- Comment #0 from Nick Voronin <elfy.nv@gmail.com> 2010-12-12 19:07:13 PST --- import std.conv; import std.format; import std.stdio; union U { int a; float b; } struct S { int t; U u; } void main() { U u; writeln(text(u)); // error instantiation toImpl S s; writeln(text(s)); // error instantiation formatValue } patching templates in this manner: -if (is(S == struct) && ... +if ((is(S == struct) || is(S == union)) && ... fixes it for me. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
January 09, 2011 [Issue 5346] instantiation of std.conv.toImpl and std.format.formatValue fails for unions | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick Voronin | http://d.puremagic.com/issues/show_bug.cgi?id=5346 Andrei Alexandrescu <andrei@metalanguage.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |andrei@metalanguage.com AssignedTo|nobody@puremagic.com |andrei@metalanguage.com -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
September 10, 2011 [Issue 5346] instantiation of std.conv.toImpl and std.format.formatValue fails for unions | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick Voronin | http://d.puremagic.com/issues/show_bug.cgi?id=5346 --- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2011-09-10 11:50:43 PDT --- Partial fixed in 2.055. formatValue is now support union formatting. void main() { U u; //writeln(text(u)); // toImpl error instantiation toImpl writeln(u); // Prints "U" S s; //writeln(text(s)); // toImpl error instantiation formatValue writeln(s); // Prints "S(0, U)" } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 14, 2012 [Issue 5346] instantiation of std.conv.toImpl and std.format.formatValue fails for unions | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick Voronin | http://d.puremagic.com/issues/show_bug.cgi?id=5346 Kenji Hara <k.hara.pg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> 2012-06-14 02:40:29 PDT --- Works in 2.060head. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation