ReactivePlusPlus
ReactiveX implementation for C++20
Loading...
Searching...
No Matches
rpp::constraint::observable_strategy Concept Reference

A concept that defines the requirements for an observable strategy. More...

#include <fwd.hpp>

Concept definition

template<typename S, typename T>
{
strategy.subscribe(std::move(observer))
} -> std::same_as<void>;
typename S::value_type;
typename S::optimal_disposables_strategy;
}
Base class for any observer used in RPP. It handles core callbacks of observers. Objects of this clas...
Definition observer.hpp:172
A concept that defines the requirements for an observable strategy.
Definition fwd.hpp:35
Definition fwd.hpp:250

Detailed Description

A concept that defines the requirements for an observable strategy.

This concept ensures that a type S meets the following criteria:

  • It has a subscribe method that accepts observer of type T and returns void.
  • It defines a nested type value_type to represent the type of values emitted by the observable.
  • It defines a nested type optimal_disposables_strategy to define the optimal disposables strategy observer could/should use to handle current observable properly.
Template Parameters
SThe type to be checked against the concept.
TThe type of the values emitted by the observable.