I wish to make an extension function that doesn't care about the type of observable it receives.
For example:
template <typename T>
inline auto makeones() -> function<observable<int>(observable<T>)>
{
return [=](observable<T> s) {
return s | rxo::map([=](auto x) { return 1; })
};
}
I would like to be able to call this method without specifying the template if possible.
For example:
stream | makeones()
as opposed to
stream | makeones<myType>()
I suppose this is more of a c++ question than an rxcpp question. Is this possible to do?