[Issue 11129] New: multiSort doesn't work with std.container.Array
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Sep 27 02:36:27 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11129
Summary: multiSort doesn't work with std.container.Array
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: lomereiter at gmail.com
--- Comment #0 from Artem Tarasov <lomereiter at gmail.com> 2013-09-27 02:36:25 PDT ---
import std.container, std.algorithm;
void main() {
auto a = Array!int(1, 2, 3);
multiSort!("a < b", "a < b")(a[]);
}
Output of DMD 2.063:
...algorithm.d(8244): Error: template std.algorithm.partition3 does not match
any function template declaration. Candidates are:
...algorithm.d(7815): std.algorithm.partition3(alias less = "a < b",
SwapStrategy ss = SwapStrategy.unstable, Range, E)(Range r, E pivot) if (ss ==
SwapStrategy.unstable && isRandomAccessRange!(Range) &&
hasSwappableElements!(Range) && hasLength!(Range) &&
is(typeof(binaryFun!(less)(r.front, pivot)) == bool) &&
is(typeof(binaryFun!(less)(pivot, r.front)) == bool) &&
is(typeof(binaryFun!(less)(r.front, r.front)) == bool))
...algorithm.d(8244): Error: template std.algorithm.partition3(alias less = "a
< b", SwapStrategy ss = SwapStrategy.unstable, Range, E)(Range r, E pivot) if
(ss == SwapStrategy.unstable && isRandomAccessRange!(Range) &&
hasSwappableElements!(Range) && hasLength!(Range) &&
is(typeof(binaryFun!(less)(r.front, pivot)) == bool) &&
is(typeof(binaryFun!(less)(pivot, r.front)) == bool) &&
is(typeof(binaryFun!(less)(r.front, r.front)) == bool)) cannot deduce template
function from argument types !("a < b", cast(SwapStrategy)0)(Range, int)
...algorithm.d(8244): Error: template instance partition3!("a < b",
cast(SwapStrategy)0) errors instantiating template
test.d(4): Error: template instance std.algorithm.multiSort!("a < b", "a <
b").multiSort!(Range) error instantiating
--
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