On Thursday, 22 October 2015 at 05:17:29 UTC, Cauterite wrote:
On Thursday, 22 October 2015 at 04:25:01 UTC, MobPassenger
wrote:
On Thursday, 22 October 2015 at 04:01:16 UTC, Mike Parker
wrote:
On Thursday, 22 October 2015 at 03:19:49 UTC, MobPassenger
wrote:
code:
---
struct Foo
{
bool op
On Thursday, 22 October 2015 at 04:01:16 UTC, Mike Parker wrote:
On Thursday, 22 October 2015 at 03:19:49 UTC, MobPassenger
wrote:
code:
---
struct Foo
{
bool opIn_r(T)(T t){return false;}
}
This needs to be marked with const:
struct Foo
{
bool opIn_r(T)(T t) const {return false;}
}
On Thursday, 22 October 2015 at 03:18:25 UTC, MobPassenger wrote:
code:
Plz don't reply, there's been a forum bug while posting. Full
post is here:
http://forum.dlang.org/thread/kaqyeiakjunqoexos...@forum.dlang.org
code:
---
struct Foo
{
bool opIn_r(T)(T t){return false;}
}
static immutable Foo foo; // ouch
//static Foo foo; // OK
void main()
{
assert("a" !in foo);
}
code:
---
struct Foo
{
bool opIn_r(T)(T t){return false;}
}
static immutable Foo foo; // ouch
//static Foo foo; // OK
void main()
{
assert("a" !in foo);
}
---
output:
---
Error: template Foo.opIn_r cannot deduce function from argument
types !()(string) immutable, candidates are:
runna