UDAs - Restrict to User Defined Types?

Adam D. Ruppe destructionator at gmail.com
Fri Nov 9 05:08:11 PST 2012


On Friday, 9 November 2012 at 05:11:05 UTC, Walter Bright wrote:
> Many algorithms (at least the ones in Phobos do) already do a 
> check to ensure the inputs are the correct kind of range.

There's two annoyances there:

1) the error messages can be godawful, not giving you any 
indication why. It's like "Foo doesn't match any template" and 
you've gotta figure out just what is the problem.

2) The error is at the call site, not the declaration site. Did 
you just flip the order of parameters? Or is the struct itself 
bad?


More information about the Digitalmars-d mailing list