On 3/31/16 10:30 AM, Q. Schroll wrote:
On Thursday, 31 March 2016 at 13:51:00 UTC, Steven Schveighoffer wrote:
I think it's a bug. foreach and opApply are specially coded in the
compiler I think, so there's bound to be inconsistencies between them
and normal overload rules.
I have never filed
On Thursday, 31 March 2016 at 13:51:00 UTC, Steven Schveighoffer
wrote:
I think it's a bug. foreach and opApply are specially coded in
the compiler I think, so there's bound to be inconsistencies
between them and normal overload rules.
-Steve
I have never filed a bug report. Should this be r
On 3/31/16 6:23 AM, Q. Schroll wrote:
Simple as that, shouldn't this work?
struct X
{
int opApply(int delegate(string) dg)
{
return dg("impure");
}
int opApply(int delegate(string) pure dg) pure
{
return dg("pure");
}
}
void main()
{
X x;
Simple as that, shouldn't this work?
struct X
{
int opApply(int delegate(string) dg)
{
return dg("impure");
}
int opApply(int delegate(string) pure dg) pure
{
return dg("pure");
}
}
void main()
{
X x;
string result;
x.opApply(
(string