@@ -30,7 +30,7 @@ namespace reactivesocket {
30
30
// / implicitly specified as virtual, depending on whether the Base class
31
31
// / is implementing the (virtual) methods of the
32
32
// / Subscription or the Subscriber interface.
33
- template <typename Base, typename Payload = Payload>
33
+ template <typename Base, typename T = Payload>
34
34
class MemoryMixin : public Base {
35
35
static_assert (
36
36
std::is_base_of<IntrusiveDeleter, Base>::value,
@@ -42,8 +42,8 @@ class MemoryMixin : public Base {
42
42
~MemoryMixin () {}
43
43
44
44
// / @{
45
- // / Publisher<Payload >
46
- void subscribe (Subscriber<Payload >& subscriber) {
45
+ // / Publisher<T >
46
+ void subscribe (Subscriber<T >& subscriber) {
47
47
Base::incrementRefCount ();
48
48
Base::subscribe (subscriber);
49
49
}
@@ -62,13 +62,13 @@ class MemoryMixin : public Base {
62
62
// / @}
63
63
64
64
// / @{
65
- // / Subscriber<Payload >
65
+ // / Subscriber<T >
66
66
void onSubscribe (Subscription& subscription) {
67
67
Base::incrementRefCount ();
68
68
Base::onSubscribe (subscription);
69
69
}
70
70
71
- void onNext (Payload payload) {
71
+ void onNext (T payload) {
72
72
Base::onNext (std::move (payload));
73
73
}
74
74
@@ -126,11 +126,10 @@ class WithIntrusiveDeleter {
126
126
127
127
} // namespace details
128
128
129
- template <typename Base, typename Payload = Payload, typename ... TArgs>
129
+ template <typename Base, typename T = Payload, typename ... TArgs>
130
130
Base& createManagedInstance (TArgs&&... args) {
131
131
auto * instance =
132
- new MemoryMixin<typename details::WithIntrusiveDeleter<Base>::T,
133
- Payload>(
132
+ new MemoryMixin<typename details::WithIntrusiveDeleter<Base>::T, T>(
134
133
std::forward<TArgs>(args)...);
135
134
return *instance;
136
135
}
0 commit comments