Error deducing function

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Sun Jan 22 02:43:07 PST 2017


On Friday, 13 January 2017 at 23:22:22 UTC, Ignacious wrote:
> On Friday, 13 January 2017 at 22:57:09 UTC, Adam D. Ruppe wrote:
>> On Friday, 13 January 2017 at 22:22:12 UTC, Ignacious wrote:
>>> Like, which arguments actually pass and which ones fail, etc.
>>
>> Yes, I agree entirely. This would be a HUGE usability bonus, 
>> far better than most the other things people work on...
>
> And it should be very simple to do. as the compiler checks the 
> arguments it reaches the argument that it finds invalid and it 
> simply has to calculate the length in to the string to put 
> something like a >> in front of the argument in the error 
> string. Or simply give the index in to the argument or template 
> list.
>
> Probably take a good programmer less than an hour to do.

Actually it's not as easy since there can be many 
overloads/definitions of a template and printing out additional 
information for the failing arguments will clutter the few even 
more.


More information about the Digitalmars-d mailing list