I have class:
class base_event;
Several classes derive from it:
class event_1 : base_event;
class event_2 : base_event;
I have an observable:
observable<base_event> o
;
I would like to subscribe to o and get event_1 and event_2 seperately.
o.of_type(event_1).subscribe([](event_1& e){});
o.of_type(event_2).subscribe([](event_2& e){});
Is there a way to create the of_type operator like this?