26 #ifndef MLN_FUN_P2V_TERNARY_HH
27 # define MLN_FUN_P2V_TERNARY_HH
34 # include <mln/fun/internal/selector.hh>
46 template <
typename P,
typename T,
typename F>
56 template <typename Pt>
57 result operator()(const Pt&
p) const;
66 template <typename P, typename
T, typename F>
73 # ifndef MLN_INCLUDE_ONLY
75 template <
typename P,
typename T,
typename F>
80 : f_pred_(
exact(f_pred)),
81 f_true_(
exact(f_true)),
82 f_false_(
exact(f_false))
86 template <
typename P,
typename T,
typename F>
87 template <
typename Pt>
90 ternary_<P,T,F>::operator()(const Pt&
p)
const
92 return f_pred_(p) ? f_true_(p) : f_false_(p);
96 template <
typename P,
typename T,
typename F>
103 ternary_<P, T, F> tmp(
exact(f_pred),
109 # endif // ! MLN_INCLUDE_ONLY
118 #endif // ! MLN_FUN_P2V_TERNARY_HH