26 #ifndef MLN_ACCU_INTERNAL_COUPLE_HH
27 # define MLN_ACCU_INTERNAL_COUPLE_HH
35 # include <mln/core/concept/accumulator.hh>
36 # include <mln/accu/internal/base.hh>
38 # include <mln/metal/equal.hh>
55 template <
typename A1,
typename A2,
typename R,
typename E>
58 public mlc_equal(mln_argument(A1), mln_argument(A2))::check_t
61 typedef mln_argument(A1) argument;
66 void take_as_init(const argument& t);
67 void take(const argument& t);
68 void take(const E& other);
73 bool is_valid() const;
77 const A1& first() const;
78 const A2& second() const;
88 # ifndef MLN_INCLUDE_ONLY
90 template <
typename A1,
typename A2,
typename R,
typename E>
92 couple<A1,A2,R,E>::couple()
97 template <
typename A1,
typename A2,
typename R,
typename E>
100 couple<A1,A2,R,E>::init()
106 template <
typename A1,
typename A2,
typename R,
typename E>
109 couple<A1,A2,R,E>::take_as_init(
const argument& t)
115 template <
typename A1,
typename A2,
typename R,
typename E>
118 couple<A1,A2,R,E>::take(
const argument& t)
124 template <
typename A1,
typename A2,
typename R,
typename E>
127 couple<A1,A2,R,E>::take(
const E& other)
133 template <
typename A1,
typename A2,
typename R,
typename E>
136 couple<A1,A2,R,E>::is_valid()
const
138 return a1_.is_valid() && a2_.is_valid();
141 template <
typename A1,
typename A2,
typename R,
typename E>
144 couple<A1,A2,R,E>::first()
149 template <
typename A1,
typename A2,
typename R,
typename E>
152 couple<A1,A2,R,E>::first()
const
157 template <
typename A1,
typename A2,
typename R,
typename E>
160 couple<A1,A2,R,E>::second()
165 template <
typename A1,
typename A2,
typename R,
typename E>
168 couple<A1,A2,R,E>::second()
const
173 # endif // ! MLN_INCLUDE_ONLY
182 #endif // ! MLN_ACCU_INTERNAL_COUPLE_HH