* mln/core/concept/proxy.hxx: Add and reorder forward
declarations.
* mln/accu/site_set/rectangularity.hh (rectangularity<P>): Do not
re-import base class attributes as protected members, so that the
base class can still access them.
Adjust.
* mln/geom/seeds2tiling_roundness.hh,
* mln/subsampling/antialiased.hh,
* mln/world/inter_pixel/dim2/make_edge_image.hh:
Add missing header inclusions.
* mln/io/plot/save.hh (save)
* mln/morpho/tree/propagate_node.hh
(propagate_node_to_descendants):
Do not provide default arguments twice.
* mln/topo/face_iter.hh,
* mln/topo/n_face_iter.hh:
Add `this->' qualifiers to disambiguate calls to base class
methods.
* tests/metal/converts_to.cc (from_2): Do not rely on
uninitialized data.
(main): Add a test case.
---
milena/ChangeLog | 26 ++++++++++++++++++++
milena/mln/accu/site_set/rectangularity.hh | 19 ++++++--------
milena/mln/core/concept/proxy.hxx | 23 +++++++++++++----
milena/mln/geom/seeds2tiling_roundness.hh | 3 +-
milena/mln/io/plot/save.hh | 4 +-
milena/mln/morpho/tree/propagate_node.hh | 4 +-
milena/mln/subsampling/antialiased.hh | 3 +-
milena/mln/topo/face_iter.hh | 7 +++--
milena/mln/topo/n_face_iter.hh | 5 ++-
.../mln/world/inter_pixel/dim2/make_edge_image.hh | 3 +-
milena/tests/metal/converts_to.cc | 8 ++++-
11 files changed, 75 insertions(+), 30 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 41d7081..e294ca0 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,29 @@
+2013-02-05 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Address more remaining clang++ errors in Milena.
+
+ * mln/core/concept/proxy.hxx: Add and reorder forward
+ declarations.
+ * mln/accu/site_set/rectangularity.hh (rectangularity<P>): Do not
+ re-import base class attributes as protected members, so that the
+ base class can still access them.
+ Adjust.
+ * mln/geom/seeds2tiling_roundness.hh,
+ * mln/subsampling/antialiased.hh,
+ * mln/world/inter_pixel/dim2/make_edge_image.hh:
+ Add missing header inclusions.
+ * mln/io/plot/save.hh (save)
+ * mln/morpho/tree/propagate_node.hh
+ (propagate_node_to_descendants):
+ Do not provide default arguments twice.
+ * mln/topo/face_iter.hh,
+ * mln/topo/n_face_iter.hh:
+ Add `this->' qualifiers to disambiguate calls to base class
+ methods.
+ * tests/metal/converts_to.cc (from_2): Do not rely on
+ uninitialized data.
+ (main): Add a test case.
+
2012-03-09 Roland Levillain <roland(a)lrde.epita.fr>
More clang++ support in Milena.
diff --git a/milena/mln/accu/site_set/rectangularity.hh
b/milena/mln/accu/site_set/rectangularity.hh
index c278f0d..d74599f 100644
--- a/milena/mln/accu/site_set/rectangularity.hh
+++ b/milena/mln/accu/site_set/rectangularity.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -77,13 +77,9 @@ namespace mln
/// Return the rectangularity value.
result to_result() const;
-
- protected:
- using super_::a1_;
- using super_::a2_;
-
};
+
# ifndef MLN_INCLUDE_ONLY
template <typename P>
@@ -97,8 +93,8 @@ namespace mln
mln_result(rectangularity<P>::A1)
rectangularity<P>::bbox() const
{
- mln_precondition(a1_.is_valid());
- return a1_.to_result();
+ mln_precondition(this->a1_.is_valid());
+ return this->a1_.to_result();
}
template <typename P>
@@ -106,8 +102,8 @@ namespace mln
mln_result(rectangularity<P>::A2)
rectangularity<P>::area() const
{
- mln_precondition(a2_.is_valid());
- return a2_.to_result();
+ mln_precondition(this->a2_.is_valid());
+ return this->a2_.to_result();
}
template <typename P>
@@ -117,7 +113,8 @@ namespace mln
{
mln_precondition(this->is_valid());
// Force division return type.
- return static_cast<result>(a2_.to_result()) / a1_.to_result().nsites();
+ return static_cast<result>
+ (this->a2_.to_result()) / this->a1_.to_result().nsites();
}
# endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/mln/core/concept/proxy.hxx b/milena/mln/core/concept/proxy.hxx
index 114c4a9..3159fd3 100644
--- a/milena/mln/core/concept/proxy.hxx
+++ b/milena/mln/core/concept/proxy.hxx
@@ -1,4 +1,4 @@
-// Copyright (C) 2008, 2009, 2012 EPITA Research and Development
+// Copyright (C) 2008, 2009, 2012, 2013 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -42,9 +42,25 @@
namespace mln
{
- // Fwd decls.
+ /// Fwd decls.
+ /// \{
template <typename E> struct Proxy;
+ namespace internal
+ {
+ template <typename T>
+ struct unproxy_rec_;
+ }
+
+ template <typename T>
+ typename mln::internal::unproxy_rec_<T>::ret
+ unproxy_rec(T& t);
+
+ template <typename T>
+ typename mln::internal::unproxy_rec_<const T>::ret
+ unproxy_rec(const T& t);
+ /// \}
+
namespace internal
{
@@ -81,9 +97,6 @@ namespace mln
- template <typename T>
- struct unproxy_rec_;
-
template <typename O, bool is_proxy>
struct helper_unproxy_rec;
diff --git a/milena/mln/geom/seeds2tiling_roundness.hh
b/milena/mln/geom/seeds2tiling_roundness.hh
index 214e553..5a61d1b 100644
--- a/milena/mln/geom/seeds2tiling_roundness.hh
+++ b/milena/mln/geom/seeds2tiling_roundness.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2013 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -33,6 +33,7 @@
# include <map>
# include <mln/core/concept/image.hh>
+# include <mln/core/image/image2d.hh>
# include <mln/core/concept/neighborhood.hh>
# include <mln/core/alias/w_window2d_int.hh>
# include <mln/core/site_set/p_priority.hh>
diff --git a/milena/mln/io/plot/save.hh b/milena/mln/io/plot/save.hh
index d217915..9571847 100644
--- a/milena/mln/io/plot/save.hh
+++ b/milena/mln/io/plot/save.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// Copyright (C) 2009, 2010, 2013 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of Olena.
@@ -87,7 +87,7 @@ namespace mln
template <typename T>
inline
void save(const util::array<T>& arr, const std::string& filename,
- int start_value = 0)
+ int start_value)
{
trace::entering("mln::io::plot::save");
diff --git a/milena/mln/morpho/tree/propagate_node.hh
b/milena/mln/morpho/tree/propagate_node.hh
index 7778905..33c06c2 100644
--- a/milena/mln/morpho/tree/propagate_node.hh
+++ b/milena/mln/morpho/tree/propagate_node.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -121,7 +121,7 @@ namespace mln
const T& t,
Image<A>& a_,
const mln_value(A)& v,
- unsigned* nb_leaves = 0)
+ unsigned* nb_leaves)
{
A& a = exact(a_);
mln_precondition(a.is_valid());
diff --git a/milena/mln/subsampling/antialiased.hh
b/milena/mln/subsampling/antialiased.hh
index 66bdd33..24b7224 100644
--- a/milena/mln/subsampling/antialiased.hh
+++ b/milena/mln/subsampling/antialiased.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// Copyright (C) 2009, 2010, 2013 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of Olena.
@@ -33,6 +33,7 @@
#include <mln/core/concept/image.hh>
+#include <mln/core/alias/point2d.hh>
#include <mln/border/thickness.hh>
#include <mln/extension/adjust_duplicate.hh>
#include <mln/core/macros.hh>
diff --git a/milena/mln/topo/face_iter.hh b/milena/mln/topo/face_iter.hh
index c78500a..6e91a08 100644
--- a/milena/mln/topo/face_iter.hh
+++ b/milena/mln/topo/face_iter.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -162,7 +163,7 @@ namespace mln
face_fwd_iter<D>::face_fwd_iter(complex<D>& c)
: super_(c)
{
- set_cplx(c);
+ this->set_cplx(c);
mln_postcondition(!is_valid());
}
@@ -214,7 +215,7 @@ namespace mln
face_bkd_iter<D>::face_bkd_iter(complex<D>& c)
: super_(c)
{
- set_cplx(c);
+ this->set_cplx(c);
mln_postcondition(!is_valid());
}
diff --git a/milena/mln/topo/n_face_iter.hh b/milena/mln/topo/n_face_iter.hh
index 4cdb091..9dfc670 100644
--- a/milena/mln/topo/n_face_iter.hh
+++ b/milena/mln/topo/n_face_iter.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -191,7 +192,7 @@ namespace mln
: super_(c)
{
mln_precondition(n <= D);
- set_cplx(c);
+ this->set_cplx(c);
set_n(n);
mln_postcondition(!is_valid());
}
diff --git a/milena/mln/world/inter_pixel/dim2/make_edge_image.hh
b/milena/mln/world/inter_pixel/dim2/make_edge_image.hh
index 8012b60..68593bd 100644
--- a/milena/mln/world/inter_pixel/dim2/make_edge_image.hh
+++ b/milena/mln/world/inter_pixel/dim2/make_edge_image.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -30,6 +30,7 @@
///
/// Construct a valued image of edges.
+# include <mln/core/image/image2d.hh>
# include <mln/core/image/dmorph/extension_ima.hh>
# include <mln/core/image/dmorph/image_if.hh>
diff --git a/milena/tests/metal/converts_to.cc b/milena/tests/metal/converts_to.cc
index 119fc8f..68b20b9 100644
--- a/milena/tests/metal/converts_to.cc
+++ b/milena/tests/metal/converts_to.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -25,6 +26,7 @@
#include <mln/metal/converts_to.hh>
+#include <mln/accu/math/sum.hh>
struct from_1
@@ -38,7 +40,7 @@ struct dest
struct from_2
{
- operator dest() const { dest* tmp; return *tmp; }
+ operator dest() const { dest* tmp = 0; return *tmp; }
};
@@ -72,6 +74,8 @@ int main()
metal::converts_to<derived, base>::check();
metal::converts_to<derived, const base>::check();
+ metal::converts_to<accu::math::sum<int, int>, int>::check();
+
// metal::converts_to<derived, base_>::check_not();
// metal::converts_to<derived, const base_>::check_not();
}
--
1.7.2.5