16 #if !defined(RXCPP_OPERATORS_RX_IGNORE_ELEMENTS_HPP) 17 #define RXCPP_OPERATORS_RX_IGNORE_ELEMENTS_HPP 19 #include "../rx-includes.hpp" 28 struct ignore_elements_invalid_arguments {};
31 struct ignore_elements_invalid :
public rxo::operator_base<ignore_elements_invalid_arguments<AN...>> {
32 using type = observable<ignore_elements_invalid_arguments<
AN...>, ignore_elements_invalid<
AN...>>;
35 using ignore_elements_invalid_t =
typename ignore_elements_invalid<
AN...>::type;
39 typedef rxu::decay_t<T> source_value_type;
41 template<
class Subscriber>
42 struct ignore_elements_observer
44 typedef ignore_elements_observer<Subscriber> this_type;
45 typedef source_value_type value_type;
46 typedef rxu::decay_t<Subscriber> dest_type;
47 typedef observer<value_type, this_type> observer_type;
50 ignore_elements_observer(dest_type d)
55 void on_next(source_value_type)
const {
59 void on_error(std::exception_ptr e)
const {
63 void on_completed()
const {
67 static subscriber<value_type, observer_type> make(dest_type d) {
68 return make_subscriber<value_type>(d, this_type(d));
72 template<
class Subscriber>
73 auto operator()(Subscriber dest)
const 74 -> decltype(ignore_elements_observer<Subscriber>::make(std::move(dest))) {
75 return ignore_elements_observer<Subscriber>::make(std::move(dest));
86 return operator_factory<ignore_elements_tag,
AN...>(std::make_tuple(std::forward<AN>(an)...));
94 template<
class Observable,
98 class IgnoreElements = rxo::detail::ignore_elements<SourceValue>>
100 -> decltype(o.template lift<SourceValue>(IgnoreElements())) {
101 return o.template lift<SourceValue>(IgnoreElements());
104 template<
class...
AN>
105 static operators::detail::ignore_elements_invalid_t<
AN...>
member(
AN...) {
108 static_assert(
sizeof...(
AN) == 10000,
"ignore_elements takes no arguments");
Definition: rx-all.hpp:26
typename std::decay< T >::type::value_type value_type_t
Definition: rx-util.hpp:35
Definition: rx-operators.hpp:69
auto AN
Definition: rx-finally.hpp:105
static auto member(Observable &&o) -> decltype(o.template lift< SourceValue >(IgnoreElements()))
Definition: rx-ignore_elements.hpp:99
Definition: rx-operators.hpp:47
Definition: rx-operators.hpp:241
typename std::enable_if< all_true_type< BN... >::value >::type enable_if_all_true_type_t
Definition: rx-util.hpp:114
static operators::detail::ignore_elements_invalid_t< AN... > member(AN...)
Definition: rx-ignore_elements.hpp:105
auto ignore_elements(AN &&...an) -> operator_factory< ignore_elements_tag, AN... >
Do not emit any items from the source Observable, but allow termination notification (either onError ...
Definition: rx-ignore_elements.hpp:84
Definition: rx-predef.hpp:177