Re: IFTI in Eponymous Templates

2016-06-29 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 29 June 2016 at 21:38:23 UTC, ag0aep6g wrote: You're explicitly instantiating the outer bar there, not the inner one. Yes, you're correct. I mixed up the inner/outer. I just thought it was something weird I had noticed.

Re: IFTI in Eponymous Templates

2016-06-29 Thread ag0aep6g via Digitalmars-d-learn
On 06/29/2016 08:59 PM, jmh530 wrote: For instance, in the bar function below, I have to explicitly instantiate the inner function template. [...] template bar(T) { T bar(U)(T x, U y) { return x + cast(T)y; } } void main() { int a = 1; long b = 2; auto

Re: IFTI in Eponymous Templates

2016-06-29 Thread Hiemlick Hiemlicker via Digitalmars-d-learn
On Wednesday, 29 June 2016 at 18:59:19 UTC, jmh530 wrote: I was playing around with some Eponymous Templates. I had been under the impression that Implicit Function-Template Instantiation (IFTI) meant that you don't have to explicitly instantiate all functions. However, it seems like there are

IFTI in Eponymous Templates

2016-06-29 Thread jmh530 via Digitalmars-d-learn
I was playing around with some Eponymous Templates. I had been under the impression that Implicit Function-Template Instantiation (IFTI) meant that you don't have to explicitly instantiate all functions. However, it seems like there are cases with eponymous templates with functions in them that