[Issue 11013] New: ignoring variable inside the predicate of findSplitBefore
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Sep 11 14:00:28 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11013
Summary: ignoring variable inside the predicate of
findSplitBefore
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: alienballance at gmail.com
--- Comment #0 from Mariusz Gliwiński <alienballance at gmail.com> 2013-09-11 14:00:25 PDT ---
I missed some functionality in std.algorithm, so i decided to use
findSplitBefore for my purpose.
Here is the code:
http://dpaste.dzfl.pl/68f9ba62
Unfortunately, ignoring second variable in pred, results in compilation error
like this:
/opt/compilers/dmd2/include/std/algorithm.d(4292): Error: template
std.algorithm.find matches more than one template declaration,
/opt/compilers/dmd2/include/std/algorithm.d(3504):find(alias pred = "a == b",
R, E)(R haystack, E needle) if (isInputRange!(R) &&
is(typeof(binaryFun!(pred)(haystack.front, needle)) : bool)) and
/opt/compilers/dmd2/include/std/algorithm.d(3555):find(alias pred = "a == b",
R1, R2)(R1 haystack, R2 needle) if (isForwardRange!(R1) && isForwardRange!(R2)
&& is(typeof(binaryFun!(pred)(haystack.front, needle.front)) : bool) &&
!isRandomAccessRange!(R1))
/opt/compilers/dmd2/include/std/range.d(611): Error: static assert "Cannot put
a char[] into a Appender!(string)"
/opt/compilers/dmd2/include/std/format.d(1433): instantiated from here:
put!(Appender!(string), char[])
/opt/compilers/dmd2/include/std/format.d(1335): instantiated from here:
formatUnsigned!(Appender!(string), char)
/opt/compilers/dmd2/include/std/format.d(1309): instantiated from here:
formatIntegral!(Appender!(string), ulong, char)
/opt/compilers/dmd2/include/std/format.d(2950): ... (5 instantiations,
-v to show) ...
/opt/compilers/dmd2/include/std/algorithm.d(4294): instantiated from
here: tuple!(string, string)
/d682/f882.d(6): instantiated from here: findSplitBefore!("a==a",
string, string)
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list