class ObserverObject(R, E...){...} template observerObject(E) { ObserverObject!(R, E) observerObject(R)(R range) { return new ObserverObject!(R, E)(range); } } struct TestObserver {...} auto observer = observerObject!int(TestObserver()); -- Robert M. Münch http://www.saphirion.com smarter | better | faster
How does this template work?
Robert M. Münch via Digitalmars-d-learn Sun, 16 Jun 2019 08:16:22 -0700
How does the observerObject Template and function work? I'm struggling
because both use the same name and how is the template parameter R
deduced/where is it coming from? Looks like it's somehow implicitly
deduced.
- How does this template work? Robert M. Münch via Digitalmars-d-learn
- Re: How does this template w... Robert M. Münch via Digitalmars-d-learn
- Re: How does this templa... aliak via Digitalmars-d-learn
- Re: How does this te... Robert M. Münch via Digitalmars-d-learn
- Re: How does this template w... XavierAP via Digitalmars-d-learn