* mln/core/concept/meta_accumulator.hh: introduce a helper to help
icc resolving routine return types.
---
milena/ChangeLog | 7 ++++++
milena/mln/core/concept/meta_accumulator.hh | 29 +++++++++++++++++++++-----
2 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 7138445..493a76c 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,12 @@
2009-07-06 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+ Fix compilation issues with icc and meta accumulators.
+
+ * mln/core/concept/meta_accumulator.hh: introduce a helper to help
+ icc resolving routine return types.
+
+2009-07-06 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+
Use mln_accu_result() instead of mln_accu_with()::result.
* mln/accu/compute.hh,
diff --git a/milena/mln/core/concept/meta_accumulator.hh
b/milena/mln/core/concept/meta_accumulator.hh
index 7b6ac6a..013826a 100644
--- a/milena/mln/core/concept/meta_accumulator.hh
+++ b/milena/mln/core/concept/meta_accumulator.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -42,20 +43,37 @@ A::with< T >::ret
# define mln_accu_result(A, T) \
-typename A::template with< T >::ret::result
+typename mln::internal::accu_ret_result_helper<A,T>::result
-# define mln_accu_result_(A, T) \
-A::with< T >::ret::result
+# define mln_accu_result_(A, T) \
+mln::internal::accu_ret_result_helper<A,T>::result
+
namespace mln
{
- // Fwd decl.
+ // Forward declaration.
template <typename E> struct Meta_Accumulator;
+
+ namespace internal
+ {
+
+ /// Make the type resolution easier for the compiler.
+ /// Introduced for ICC compatibility.
+ //
+ template <typename A, typename T>
+ struct accu_ret_result_helper
+ {
+ typedef typename A::template with< T >::ret::result result;
+ };
+
+ } // end of namespace mln::internal
+
+
// Meta_Accumulator category flag type.
template <>
struct Meta_Accumulator<void>
@@ -63,7 +81,6 @@ namespace mln
typedef Object<void> super;
};
-
/*! \brief Base class for implementation of meta accumulators.
*
* The parameter \a E is the exact type.
--
1.5.6.5