Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Operator overloading of named mixin templates #18744

Open
dlangBugzillaToGithub opened this issue Dec 29, 2013 · 2 comments
Open

Operator overloading of named mixin templates #18744

dlangBugzillaToGithub opened this issue Dec 29, 2013 · 2 comments

Comments

@dlangBugzillaToGithub
Copy link

Vladimir Panteleev (@CyberShadow) reported this on 2013-12-29T13:50:54Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=11842

CC List

  • basile-z
  • Maksim Zholudev (@MaksimZh)
  • Simen Kjaeraas
  • Vlad Levenfeld

Description

This code ought to work:

mixin template M()
{
	bool opIn_r(int i) { return true; }
}

struct S
{
	mixin M m;
}

void main()
{
	S s;
	assert(5 in s.m);
}
@dlangBugzillaToGithub
Copy link
Author

andrej.mitrovich (@AndrejMitrovic) commented on 2014-02-14T12:59:20Z

*** Issue 12159 has been marked as a duplicate of this issue. ***

@dlangBugzillaToGithub
Copy link
Author

simen.kjaras commented on 2020-05-25T12:25:16Z

See also issue 5158.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant