* mln/accu/compute.hh,
* mln/accu/transform.hh,
* mln/accu/transform_diagonal.hh,
* mln/accu/transform_directional.hh,
* mln/accu/transform_line.hh,
* mln/accu/transform_snake.hh,
* mln/accu/transform_stop.hh,
* mln/core/concept/meta_accumulator.hh,
* mln/data/compute.hh,
* mln/labeling/compute.hh,
* mln/set/compute.hh,
* mln/set/compute_with_weights.hh: use a helper to deduce the
accumulator type from a meta accumulator.
* mln/core/image/dmorph/extended.hh: define 'value'.
---
milena/ChangeLog | 20 ++++++++++++++++++++
milena/mln/accu/compute.hh | 4 ++--
milena/mln/accu/transform.hh | 4 ++--
milena/mln/accu/transform_diagonal.hh | 4 ++--
milena/mln/accu/transform_directional.hh | 4 ++--
milena/mln/accu/transform_line.hh | 4 ++--
milena/mln/accu/transform_snake.hh | 4 ++--
milena/mln/accu/transform_stop.hh | 4 ++--
milena/mln/core/concept/meta_accumulator.hh | 25 ++++++++++++++++++-------
milena/mln/core/image/dmorph/extended.hh | 5 ++++-
milena/mln/data/compute.hh | 4 ++--
milena/mln/labeling/compute.hh | 8 ++++----
milena/mln/set/compute.hh | 4 ++--
milena/mln/set/compute_with_weights.hh | 4 ++--
14 files changed, 66 insertions(+), 32 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index b311841..c842b8c 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,23 @@
+2009-07-07 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+
+ Fix compilation issues with ICC.
+
+ * mln/accu/compute.hh,
+ * mln/accu/transform.hh,
+ * mln/accu/transform_diagonal.hh,
+ * mln/accu/transform_directional.hh,
+ * mln/accu/transform_line.hh,
+ * mln/accu/transform_snake.hh,
+ * mln/accu/transform_stop.hh,
+ * mln/core/concept/meta_accumulator.hh,
+ * mln/data/compute.hh,
+ * mln/labeling/compute.hh,
+ * mln/set/compute.hh,
+ * mln/set/compute_with_weights.hh: use a helper to deduce the
+ accumulator type from a meta accumulator.
+
+ * mln/core/image/dmorph/extended.hh: define 'value'.
+
2009-07-06 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
Fix ambiguous typedef 'value'.
diff --git a/milena/mln/accu/compute.hh b/milena/mln/accu/compute.hh
index 56413ac..aeb86e2 100644
--- a/milena/mln/accu/compute.hh
+++ b/milena/mln/accu/compute.hh
@@ -72,7 +72,7 @@ namespace mln
/// \warning This routine does not perform a.init().
///
template <typename A, typename I>
- mln_accu_result(A, util::pix<I>)
+ mln_meta_accu_result(A, util::pix<I>)
compute(const Meta_Accumulator<A>& a, const Image<I>& input);
@@ -140,7 +140,7 @@ namespace mln
template <typename A, typename I>
inline
- mln_accu_result(A, util::pix<I>)
+ mln_meta_accu_result(A, util::pix<I>)
compute(const Meta_Accumulator<A>& a, const Image<I>& input)
{
trace::entering("accu::compute");
diff --git a/milena/mln/accu/transform.hh b/milena/mln/accu/transform.hh
index 7c0fbf9..eeae247 100644
--- a/milena/mln/accu/transform.hh
+++ b/milena/mln/accu/transform.hh
@@ -50,7 +50,7 @@ namespace mln
const Window<W>& win);
template <typename I, typename A, typename W>
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform(const Image<I>& input,
const Meta_Accumulator<A>& a,
const Window<W>& win);
@@ -197,7 +197,7 @@ namespace mln
}
template <typename I, typename A, typename W>
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform(const Image<I>& input, const Meta_Accumulator<A>& a,
const Window<W>& win)
{
trace::entering("accu::transform");
diff --git a/milena/mln/accu/transform_diagonal.hh
b/milena/mln/accu/transform_diagonal.hh
index 99000f4..2c73c8a 100644
--- a/milena/mln/accu/transform_diagonal.hh
+++ b/milena/mln/accu/transform_diagonal.hh
@@ -65,7 +65,7 @@ namespace mln
template <typename A, typename I, typename W>
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform_diagonal(const Meta_Accumulator<A>& a,
const Image<I>& input, const Window<W>& win);
@@ -444,7 +444,7 @@ namespace mln
template <typename A, typename I, typename W>
inline
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform_diagonal(const Meta_Accumulator<A>& a,
const Image<I>& input, const Window<W>& win)
{
diff --git a/milena/mln/accu/transform_directional.hh
b/milena/mln/accu/transform_directional.hh
index 46863cc..5534a56 100644
--- a/milena/mln/accu/transform_directional.hh
+++ b/milena/mln/accu/transform_directional.hh
@@ -63,7 +63,7 @@ namespace mln
template <typename A, typename I, typename W>
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform_directional(const Meta_Accumulator<A>& a,
const Image<I>& input, const Window<W>& win,
unsigned dir);
@@ -318,7 +318,7 @@ namespace mln
template <typename A, typename I, typename W>
inline
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform_directional(const Meta_Accumulator<A>& a,
const Image<I>& input, const Window<W>& win,
unsigned dir)
diff --git a/milena/mln/accu/transform_line.hh b/milena/mln/accu/transform_line.hh
index 604853d..42daf31 100644
--- a/milena/mln/accu/transform_line.hh
+++ b/milena/mln/accu/transform_line.hh
@@ -56,7 +56,7 @@ namespace mln
unsigned length, unsigned dir);
template <typename A, typename I>
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform_line(const Meta_Accumulator<A>& a,
const Image<I>& input,
unsigned length, unsigned dir);
@@ -360,7 +360,7 @@ namespace mln
template <typename A, typename I>
inline
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform_line(const Meta_Accumulator<A>& a,
const Image<I>& input,
unsigned length, unsigned dir)
diff --git a/milena/mln/accu/transform_snake.hh b/milena/mln/accu/transform_snake.hh
index 62140d4..3890eb4 100644
--- a/milena/mln/accu/transform_snake.hh
+++ b/milena/mln/accu/transform_snake.hh
@@ -62,7 +62,7 @@ namespace mln
template <typename A, typename I, typename W>
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform_snake(const Meta_Accumulator<A>& a, const Image<I>&
input, const Window<W>& win);
@@ -452,7 +452,7 @@ namespace mln
template <typename A, typename I, typename W>
inline
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform_snake(const Meta_Accumulator<A>& a,
const Image<I>& input, const Window<W>& win)
{
diff --git a/milena/mln/accu/transform_stop.hh b/milena/mln/accu/transform_stop.hh
index e9c62e6..b694042 100644
--- a/milena/mln/accu/transform_stop.hh
+++ b/milena/mln/accu/transform_stop.hh
@@ -48,7 +48,7 @@ namespace mln
transform_stop(const Image<I>& input, const Accumulator<A>& a,
const Window<W>& win);
template <typename I, typename A, typename W>
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform_stop(const Image<I>& input, const Meta_Accumulator<A>&
a, const Window<W>& win);
@@ -201,7 +201,7 @@ namespace mln
}
template <typename I, typename A, typename W>
- mln_ch_value(I, mln_accu_result(A, mln_value(I)))
+ mln_ch_value(I, mln_meta_accu_result(A, mln_value(I)))
transform_stop(const Image<I>& input, const Meta_Accumulator<A>&
a, const Window<W>& win)
{
trace::entering("accu::transform_stop");
diff --git a/milena/mln/core/concept/meta_accumulator.hh
b/milena/mln/core/concept/meta_accumulator.hh
index 013826a..f00a0c6 100644
--- a/milena/mln/core/concept/meta_accumulator.hh
+++ b/milena/mln/core/concept/meta_accumulator.hh
@@ -36,18 +36,18 @@
# define mln_accu_with(A, T) \
-typename A::template with< T >::ret
+typename mln::internal::accu_with_helper<A,T>::ret
# define mln_accu_with_(A, T) \
-A::with< T >::ret
+mln::internal::accu_with_helper<A,T>::ret
-# define mln_accu_result(A, T) \
-typename mln::internal::accu_ret_result_helper<A,T>::result
+# define mln_meta_accu_result(A, T) \
+typename mln::internal::meta_accu_ret_result_helper<A,T>::result
-# define mln_accu_result_(A, T) \
-mln::internal::accu_ret_result_helper<A,T>::result
+# define mln_meta_accu_result_(A, T) \
+mln::internal::meta_accu_ret_result_helper<A,T>::result
@@ -66,11 +66,22 @@ namespace mln
/// Introduced for ICC compatibility.
//
template <typename A, typename T>
- struct accu_ret_result_helper
+ struct meta_accu_ret_result_helper
{
typedef typename A::template with< T >::ret::result result;
};
+
+ /// Make the type resolution easier for the compiler.
+ /// Introduced for ICC compatibility.
+ //
+ template <typename A, typename T>
+ struct accu_with_helper
+ {
+ typedef typename A::template with< T >::ret ret;
+ };
+
+
} // end of namespace mln::internal
diff --git a/milena/mln/core/image/dmorph/extended.hh
b/milena/mln/core/image/dmorph/extended.hh
index 581359f..588f95a 100644
--- a/milena/mln/core/image/dmorph/extended.hh
+++ b/milena/mln/core/image/dmorph/extended.hh
@@ -95,6 +95,9 @@ namespace mln
private mlc_not_equal(mln_trait_image_ext_domain(I),
trait::image::ext_domain::none)::check_t
{
+ /// Value type.
+ typedef mln_value(I) value;
+
/// Skeleton.
typedef tag::image_<I> skeleton; // This property is lost!
@@ -124,7 +127,7 @@ namespace mln
template <typename I, typename B>
extended<I>
extended_to(Image<I>& ima, const Box<B>& b);
-
+
# ifndef MLN_INCLUDE_ONLY
diff --git a/milena/mln/data/compute.hh b/milena/mln/data/compute.hh
index 63942cd..c0d87cc 100644
--- a/milena/mln/data/compute.hh
+++ b/milena/mln/data/compute.hh
@@ -61,7 +61,7 @@ namespace mln
/// \return The accumulator result.
///
template <typename A, typename I>
- mln_accu_result(A, mln_value(I))
+ mln_meta_accu_result(A, mln_value(I))
compute(const Meta_Accumulator<A>& a, const Image<I>& input);
@@ -90,7 +90,7 @@ namespace mln
template <typename A, typename I>
inline
- mln_accu_result(A, mln_value(I))
+ mln_meta_accu_result(A, mln_value(I))
compute(const Meta_Accumulator<A>& a, const Image<I>& input)
{
typedef mln_accu_with(A, mln_value(I)) A_;
diff --git a/milena/mln/labeling/compute.hh b/milena/mln/labeling/compute.hh
index eeede38..0e74fd7 100644
--- a/milena/mln/labeling/compute.hh
+++ b/milena/mln/labeling/compute.hh
@@ -101,7 +101,7 @@ namespace mln
/// \return A mln::p_array of accumulator result (one result per label).
//
template <typename A, typename I, typename L>
- util::array<mln_accu_result(A, mln_value(I))>
+ util::array<mln_meta_accu_result(A, mln_value(I))>
compute(const Meta_Accumulator<A>& a,
const Image<I>& input,
const Image<L>& label,
@@ -132,7 +132,7 @@ namespace mln
/// \return A mln::p_array of accumulator result (one result per label).
//
template <typename A, typename L>
- util::array<mln_accu_result(A, mln_psite(L))>
+ util::array<mln_meta_accu_result(A, mln_psite(L))>
compute(const Meta_Accumulator<A>& a,
const Image<L>& label,
const mln_value(L)& nlabels);
@@ -390,7 +390,7 @@ namespace mln
template <typename A, typename I, typename L>
inline
- util::array<mln_accu_result(A, mln_value(I))>
+ util::array<mln_meta_accu_result(A, mln_value(I))>
compute(const Meta_Accumulator<A>& a,
const Image<I>& input,
const Image<L>& label,
@@ -426,7 +426,7 @@ namespace mln
template <typename A, typename L>
inline
- util::array<mln_accu_result(A, mln_psite(L))>
+ util::array<mln_meta_accu_result(A, mln_psite(L))>
compute(const Meta_Accumulator<A>& a,
const Image<L>& label,
const mln_value(L)& nlabels)
diff --git a/milena/mln/set/compute.hh b/milena/mln/set/compute.hh
index 1828a8e..39c0164 100644
--- a/milena/mln/set/compute.hh
+++ b/milena/mln/set/compute.hh
@@ -59,7 +59,7 @@ namespace mln
// \return The accumulator result.
//
template <typename A, typename S>
- mln_accu_result(A, mln_site(S))
+ mln_meta_accu_result(A, mln_site(S))
compute(const Meta_Accumulator<A>& a, const Site_Set<S>& s);
@@ -123,7 +123,7 @@ namespace mln
template <typename A, typename S>
- mln_accu_result(A, mln_site(S))
+ mln_meta_accu_result(A, mln_site(S))
compute(const Meta_Accumulator<A>& a, const Site_Set<S>& s)
{
trace::entering("set::compute");
diff --git a/milena/mln/set/compute_with_weights.hh
b/milena/mln/set/compute_with_weights.hh
index de9c17b..b2ae04d 100644
--- a/milena/mln/set/compute_with_weights.hh
+++ b/milena/mln/set/compute_with_weights.hh
@@ -80,7 +80,7 @@ namespace mln
/// \return The accumulator result.
//
template <typename A, typename I>
- mln_accu_result(A, mln_site(I))
+ mln_meta_accu_result(A, mln_site(I))
compute_with_weights(const Meta_Accumulator<A>& a, const
Image<I>& w);
@@ -252,7 +252,7 @@ namespace mln
template <typename A, typename I>
inline
- mln_accu_result(A, mln_site(I))
+ mln_meta_accu_result(A, mln_site(I))
compute_with_weights(const Meta_Accumulator<A>& a, const
Image<I>& w)
{
trace::entering("set::compute_with_weights");
--
1.5.6.5