Thread overview
[Issue 3223] New: bool value conversions from "false" and "true" are missing
Aug 02, 2009
acehreli@yahoo.com
August 02, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3223

           Summary: bool value conversions from "false" and "true" are
                    missing
           Product: D
           Version: 2.029
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P3
         Component: Phobos
        AssignedTo: nobody@puremagic.com
        ReportedBy: acehreli@yahoo.com


false and true are outputted as "false" and "true". It is natural to have the opposite conversions as well. The following program outputs

  Segmentation fault

when "false" is sent to its standard input:

  import std.cstream;

  void main()
  {
      bool b;
      din.readf(&b);
  }

There doesn't seem to be any conversion from "false" and "true" to bool anywhere in Phobos.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 11, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3223


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: -------
June 15, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3223


Lars T. Kyllingstad <bugzilla@kyllingen.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@kyllingen.net


--- Comment #1 from Lars T. Kyllingstad <bugzilla@kyllingen.net> 2010-06-15 01:50:55 PDT ---
FYI, to() and parse() can now convert from string to bool:
http://www.dsource.org/projects/phobos/changeset/1646

Since std.stream is (about to be?) deprecated, it's probably not worth fixing
the issue with std.stream.Stream.readf().

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 27, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3223


Andrei Alexandrescu <andrei@metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


--- Comment #2 from Andrei Alexandrescu <andrei@metalanguage.com> 2010-09-26 18:41:44 PDT ---
I consider this fixed by std.conv.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------