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.

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
smarter | better | faster

Reply via email to