D-Programming-Language/dmd — pull request #1660 by 9rnsr (2013-02-14 15:52:32+00:00)
Title: Issue 1900 & 8352 & 9235 - Implement Template Overload Set

[Issue 1900](http://d.puremagic.com/issues/show_bug.cgi?id=1900) - Template overload sets & traits templates
[Issue 8352](http://d.puremagic.com/issues/show_bug.cgi?id=8352) - Wrong "__overloadset isn't a template" error
[Issue 9235](http://d.puremagic.com/issues/show_bug.cgi?id=9235) - Template mixin doesn't allow to mixin non-conflicting overloads

After this fix, for the code `Template!(tiargs)` even when `Template` is cross-module overloaded symbol, that is correctly resolved according to `tiargs` and those template constraints.

For example (from issue 8352),
```d
import std.stdio, std.algorithm;
void main() {
[1, 2].remove!(x => x == 2)();
}
```
Although `remove` is cross-module overloaded symbol (`std.file.remove` and `std.algorithm.remove`), compiler will properly choose `std.algorithm.remove` because it has explicit template argument.