[Issue 12204] New: using delegates as alias parameter to templated struct: cannot get frame pointer to sort
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Feb 19 13:12:23 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12204
Summary: using delegates as alias parameter to templated
struct: cannot get frame pointer to sort
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: tobias at pankrath.net
--- Comment #0 from Tobias Pankrath <tobias at pankrath.net> 2014-02-19 13:12:18 PST ---
--
struct Set(alias less = "a < b", T)
{
import std.algorithm;
import std.functional;
alias lessFun = binaryFun!(less);
int[] someContents;
this(R)(R r)
{
sort!(lessFun)(someContents);
}
}
unittest {
auto as2 = Set!((x,y) => x < y , int)([2, 1, 3]);
}
-- http://dpaste.dzfl.pl/af6cb1a8d8ab
It works, if I provide a normal function or a string lambda as
'less'. However the code above results in the following error:
/d923/f233.d(11): Error: constructor
f233.__unittestL15_3.Set!((x, y) => x < y,
int).Set.__ctor!(int[]).this cannot get frame pointer to sort
What's wrong?
May be related to #5710
--
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