Thread overview
[phobos] phobos commit, revision 1646
Jun 15, 2010
dsource.org
Jun 15, 2010
Brad Roberts
June 15, 2010
phobos commit, revision 1646


user: kyllingstad

msg:
Made std.string.icmp() a template function and fixed issue 3386, "to!bool(string) is not implemented"

http://www.dsource.org/projects/phobos/changeset/1646

June 15, 2010
On 6/15/2010 1:41 AM, dsource.org wrote:
> phobos commit, revision 1646
> 
> 
> user: kyllingstad
> 
> msg:
> Made std.string.icmp() a template function and fixed issue 3386, "to!bool(string) is not implemented"
> 
> http://www.dsource.org/projects/phobos/changeset/1646

Should there be a template constraint on there to limit C1 and C2 to char types?
June 15, 2010
On Tue, 2010-06-15 at 01:58 -0700, Brad Roberts wrote:
> On 6/15/2010 1:41 AM, dsource.org wrote:
> > phobos commit, revision 1646
> > 
> > 
> > user: kyllingstad
> > 
> > msg:
> > Made std.string.icmp() a template function and fixed issue 3386, "to!bool(string) is not implemented"
> > 
> > http://www.dsource.org/projects/phobos/changeset/1646
> 
> Should there be a template constraint on there to limit C1 and C2 to char types?
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos


I don't know, I was wondering about that too.  I just copied cmp()'s signature, which also doesn't have any constraints.

Since there is only one (i)cmp template, a template constraint isn't needed for disambiguation.  So the only reason to add one is to improve documentation and error messages, both of which are arguable.

-Lars