www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - What's wrong in this templatized operator overload ?

reply MobPassenger <MobPassenger nowhere.fi> writes:
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);
}
Oct 21 2015
parent reply MobPassenger <MobPassenger nowhere.fi> writes:
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/kaqyeiakjunqoexoskrw forum.dlang.org
Oct 21 2015
parent Vladimir Panteleev <thecybershadow.lists gmail.com> writes:
On Thursday, 22 October 2015 at 03:21:35 UTC, MobPassenger wrote:
 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.
What forum bug would that be?
Oct 21 2015