olena: olena-2.0-581-g90d7601 Work around a Clang 3.0 bug.

* tests/labeling/compute.cc, * tests/labeling/pack.cc: Here. --- milena/ChangeLog | 8 ++++++++ milena/tests/labeling/compute.cc | 14 +++++++++++++- milena/tests/labeling/pack.cc | 13 ++++++++++++- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 52abb9b..add0a55 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,3 +1,11 @@ +2013-07-04 Roland Levillain <roland@lrde.epita.fr> + + Work around a Clang 3.0 bug. + + * tests/labeling/compute.cc, + * tests/labeling/pack.cc: + Here. + 2013-06-28 Roland Levillain <roland@lrde.epita.fr> Aesthetic changes in mln/world/binary_2d/subsample.hh. diff --git a/milena/tests/labeling/compute.cc b/milena/tests/labeling/compute.cc index 66682e8..814435a 100644 --- a/milena/tests/labeling/compute.cc +++ b/milena/tests/labeling/compute.cc @@ -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. // @@ -33,6 +34,17 @@ #include <mln/value/label_8.hh> #include <mln/util/array.hh> + +/* Clang 3.0 wrongly complains about `label_8' + (i.e. `mln::value::label<8>') being an incomplete type when it first + encounters it (when the array `lblvals' is defined in `main' + below.). Clang 3.1 and above do not exhibit this behavior. + + Instantiate mln::value::label<8> explicitly to work around this + bug. */ +template struct mln::value::label<8>; + + int main() { using namespace mln; diff --git a/milena/tests/labeling/pack.cc b/milena/tests/labeling/pack.cc index 5a768c0..f105624 100644 --- a/milena/tests/labeling/pack.cc +++ b/milena/tests/labeling/pack.cc @@ -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. // @@ -29,6 +29,17 @@ #include <mln/value/label_16.hh> #include <mln/debug/println.hh> + +/* Clang 3.0 wrongly complains about `label_16' + (i.e. `mln::value::label<16>') being an incomplete type when it + first encounters it (when the array `vals2' is defined in `main' + below.). Clang 3.1 and above do not exhibit this behavior. + + Instantiate mln::value::label<16> explicitly to work around this + bug. */ +template struct mln::value::label<16>; + + int main() { using namespace mln; -- 1.7.10.4
participants (1)
-
Roland Levillain