std.functional:partial - disambiguating templated functions

Laeeth Isharc via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Oct 4 08:45:53 PDT 2015


How do I persuade partial to tie itself to the appropriate 
overload?
I have:

alias bars=partial!(slurpBars!BarType,filename,startDate,endDate);

where there are two overloads of slurpBars:

SomeBar[] slurpBars(SomeBar)(string filename,string datasetName, 
typeof(SomeBar.date) startDate, typeof(SomeBar.date) endDate)
SomeBar[] slurpBars(SomeBar)(hid_t filehandle,string datasetName, 
typeof(SomeBar.date) startDate, typeof(SomeBar.date) endDate)

And I receive the following error:
  Error: template kprop.marketdata.retrievebars.slurpBars matches 
more than one template declaration:

Thanks.


Laeeth.





More information about the Digitalmars-d-learn mailing list