[Issue 11698] New: readf doesn't compile with bool

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Dec 6 21:24:58 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11698

           Summary: readf doesn't compile with bool
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: jlquinn at optonline.net


--- Comment #0 from Jerry Quinn <jlquinn at optonline.net> 2013-12-06 21:24:45 PST ---
dmd 2.064.2 on linux x86_64

module bug;
import std.stdio;
void foo() {
  bool b;
  readf("%s", b);
}

/home/jlquinn/dmd2/linux/bin64/dmd -g -c readf.bug.d
/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/format.d(3938): Error:
template std.conv.parse does not match any function template declaration.
Candidates are:
/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/conv.d(1943):       
std.conv.parse(Target, Source)(ref Source s) if
(isSomeChar!(ElementType!Source) && isIntegral!Target && !is(Target == enum))
/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/conv.d(2203):       
std.conv.parse(Target, Source)(ref Source s, uint radix) if
(isSomeChar!(ElementType!Source) && isIntegral!Target && !is(Target == enum))
/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/conv.d(2299):       
std.conv.parse(Target, Source)(ref Source s) if (isExactSomeString!Source &&
is(Target == enum))
/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/conv.d(2358):       
std.conv.parse(Target, Source)(ref Source p) if (isInputRange!Source &&
isSomeChar!(ElementType!Source) && !is(Source == enum) &&
isFloatingPoint!Target && !is(Target == enum))
/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/conv.d(2834):       
std.conv.parse(Target, Source)(ref Source s) if (isExactSomeString!Source &&
staticIndexOf!(Unqual!Target, dchar, Unqual!(ElementEncodingType!Source)) >= 0)
/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/format.d(3938):        ...
(7 more, -v to show) ...
/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/format.d(3938): Error:
template std.conv.parse(Target, Source)(ref Source s) if
(isSomeChar!(ElementType!Source) && isIntegral!Target && !is(Target == enum))
cannot deduce template function from argument types !(bool)(LockingTextReader)
/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/format.d(582): Error:
template instance std.format.unformatValue!(bool, LockingTextReader, char)
error instantiating
/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/stdio.d(1005):       
instantiated from here: formattedRead!(LockingTextReader, char, bool*)
/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/stdio.d(2130):       
instantiated from here: readf!(bool*)
readf.bug.d(8):        instantiated from here: readf!(bool*)
/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/stdio.d(1005): Error:
template instance std.format.formattedRead!(LockingTextReader, char, bool*)
error instantiating
/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/stdio.d(2130):       
instantiated from here: readf!(bool*)
readf.bug.d(8):        instantiated from here: readf!(bool*)
/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/stdio.d(2130): Error:
template instance std.stdio.File.readf!(bool*) error instantiating
readf.bug.d(8):        instantiated from here: readf!(bool*)
readf.bug.d(8): Error: template instance std.stdio.readf!(bool*) error
instantiating

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


More information about the Digitalmars-d-bugs mailing list