On 7/14/2011 12:24 AM, Trass3r wrote:
Am 13.07.2011, 16:58 Uhr, schrieb Tyro[a.c.edwards] :
Don't know it this is the right answer or a possible bug but it does
the trick:
void h() { import std.stdio; write("h()"); }
class Bla
{
mixin wrap!h;
}
mixin template wrap(alias f)
{
void blub(typeof(
On 7/14/2011 12:24 AM, Trass3r wrote:
Am 13.07.2011, 16:58 Uhr, schrieb Tyro[a.c.edwards] :
Don't know it this is the right answer or a possible bug but it does
the trick:
void h() { import std.stdio; write("h()"); }
class Bla
{
mixin wrap!h;
}
mixin template wrap(alias f)
{
void blub(typeof(
I've seen this error before...
*searches memory and old code*
Here you go: http://d.puremagic.com/issues/show_bug.cgi?id=3051
I think this is yet another issue.
The inner template argument is not something on the stack but it is a
template argument.
Am 13.07.2011, 16:58 Uhr, schrieb Tyro[a.c.edwards] :
Don't know it this is the right answer or a possible bug but it does the
trick:
void h() { import std.stdio; write("h()"); }
class Bla
{
mixin wrap!h;
}
mixin template wrap(alias f)
{
void blub(typeof(&f) g = &f)
{
On 7/13/2011 11:35 PM, Trass3r wrote:
Am 13.07.2011, 16:02 Uhr, schrieb Steven Schveighoffer
:
void h() {}
class Bla
{
mixin wrap!h;
}
mixin template wrap(alias f)
{
void blub(alias g = f)()
{
g();
}
}
As a workaround, is there a reason you need blub to be parameterized?
I mean, f is alr
Am 13.07.2011, 16:02 Uhr, schrieb Steven Schveighoffer
:
void h() {}
class Bla
{
mixin wrap!h;
}
mixin template wrap(alias f)
{
void blub(alias g = f)()
{
g();
}
}
As a workaround, is there a reason you need blub to be parameterized? I
m
();
}
test.d(18): Error: template instance cannot use local 'f' as parameter
to non-global template blub(alias g = f)
test.d(18): Error: template instance forward reference of f
test.d(18): Error: template instance test.Bla.wrap!(h).blub!(f) error
instantiating
I've seen th
On 12.07.2011 15:06, Trass3r wrote:
Is this a bug? If not, how do you make it work?
void h() {}
class Bla
{
mixin wrap!h;
}
mixin template wrap(alias f)
{
void blub(alias g = f)()
{
}
}
void main()
{
Bla b = new Bla();
b.blub();
}
test.d(18): Error: template instance cannot use local '
Anybody an idea?
local 'f' as parameter to
non-global template blub(alias g = f)
test.d(18): Error: template instance forward reference of f
test.d(18): Error: template instance test.Bla.wrap!(h).blub!(f) error
instantiating
10 matches
Mail list logo