26 #ifndef MLN_CONVERT_IMPL_FROM_VALUE_TO_VALUE_HH
27 # define MLN_CONVERT_IMPL_FROM_VALUE_TO_VALUE_HH
37 # include <mln/core/concept/image.hh>
38 # include <mln/core/concept/site_set.hh>
39 # include <mln/value/concept/all.hh>
41 # include <mln/core/site_set/p_run.hh>
42 # include <mln/metal/converts_to.hh>
44 # include <mln/convert/from_to.hxx>
56 template <
typename V,
typename W>
58 from_value_to_value(
const Value<V>& from, Value<W>&
to);
63 from_value_to_value(
const Value<V>& from, Value<V>&
to);
67 # ifndef MLN_INCLUDE_ONLY
71 template <
typename V,
typename W>
73 from_value_to_value_(
const mln::value::Vectorial<V>& from,
74 mln::value::Vectorial<W>&
to)
76 exact(to) = exact(from).to_equiv();
81 template <
typename V,
typename W>
83 from_value_to_value_(
const mln::value::Scalar<V>& from,
84 mln::value::Scalar<W>& to)
86 exact(to) = exact(from).to_equiv();
89 template <
typename V,
typename W>
92 from_value_to_value_(
const Value<V>& from, Value<W>& to)
96 convert::over_load::from_to_(exact(from), exact(to));
102 template <
typename V,
typename W>
105 from_value_to_value(
const Value<V>& from, Value<W>& to)
107 from_value_to_value_(exact(from), exact(to));
110 template <
typename V>
113 from_value_to_value(
const Value<V>& from, Value<V>& to)
115 exact(to) = exact(from);
118 # endif // ! MLN_INCLUDE_ONLY
127 #endif // ! MLN_CONVERT_IMPL_FROM_VALUE_TO_VALUE_HH