|
Boost Users : |
Subject: Re: [Boost-users] [GIL] cannot compile a simple example with concept checking enabled
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2010-12-23 18:16:42
On 23/12/10 19:40, Christian Henning wrote:
> Hi Adam, what version of boost are you running? I have tried your code
> with BOOST_GIL_USE_CONCEPT_CHECK enabled and I get no compiler errors.
> I use VS2010 Express. My boost is some trunk version that's a couple
> of weeks old.
Christian,
I can confirm it does not compile using GCC 4.4.5 on Linux
with Boost 1.42.
However, it does compile with Boost from current trunk r67439.
Here is full story in more readable form:
https://gist.github.com/753667
and pasted below for ml archive:
########################################################################
mloskot_at_dog:~/workshop/gil$ g++ --version
g++ (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
mloskot_at_dog:~/workshop/gil$ cat gil_use_concept.cpp
#define BOOST_GIL_USE_CONCEPT_CHECK 1
#include <boost/gil/gil_concept.hpp>
#include <boost/gil/gil_all.hpp>
int main() {
boost::gil::gray8_image_t image;
return 0;
}
mloskot_at_dog:~/workshop/gil$
mloskot_at_dog:~/workshop/gil$ grep 'define BOOST_VERSION '
/home/mloskot/dev/boost/_svn/trunk/boost/version.hpp
#define BOOST_VERSION 104600
mloskot_at_dog:~/workshop/gil$
mloskot_at_dog:~/workshop/gil$ g++ -I/home/mloskot/dev/boost/_svn/trunk
gil_use_concept.cpp
mloskot_at_dog:~/workshop/gil$
mloskot_at_dog:~/workshop/gil$ grep 'define BOOST_VERSION '
/usr/include/boost/version.hpp
#define BOOST_VERSION 104200
mloskot_at_dog:~/workshop/gil$
mloskot_at_dog:~/workshop/gil$ g++ -I/usr/include gil_use_concept.cpp
In file included from gil_use_concept.cpp:2:
/usr/include/boost/mpl/at.hpp: In member function âvoid
boost::gil::ColorBaseConcept<ColorBase>::constraints() [with ColorBase =
boost::gil::pixel<unsigned char,
boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > >]â:
/usr/include/boost/concept/detail/has_constraints.hpp:40: instantiated
from âconst bool
boost::concept::not_satisfied<boost::gil::ColorBaseConcept<boost::gil::pixel<unsigned
char, boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > > >::valueâ
/usr/include/boost/concept/detail/has_constraints.hpp:43: instantiated
from
âboost::concept::not_satisfied<boost::gil::ColorBaseConcept<boost::gil::pixel<unsigned
char, boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > > >â
/usr/include/boost/mpl/if.hpp:67: instantiated from
âboost::mpl::if_<boost::concept::not_satisfied<boost::gil::ColorBaseConcept<boost::gil::pixel<unsigned
char, boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > > >,
boost::concept::constraint<boost::gil::ColorBaseConcept<boost::gil::pixel<unsigned
char, boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > > >,
boost::concept::requirement<boost::gil::ColorBaseConcept<boost::gil::pixel<unsigned
char, boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > > > >â
/usr/include/boost/concept/detail/general.hpp:19: instantiated from
âboost::concept::requirement_<void
(*)(boost::gil::ColorBaseConcept<boost::gil::pixel<unsigned char,
boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > >)>â
/usr/include/boost/concept_check.hpp:43: instantiated from âvoid
boost::function_requires(Model*) [with Model =
boost::gil::ColorBaseConcept<boost::gil::pixel<unsigned char,
boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > >]â
/usr/include/boost/gil/gil_concept.hpp:107: instantiated from âvoid
boost::gil::gil_function_requires() [with C =
boost::gil::ColorBaseConcept<boost::gil::pixel<unsigned char,
boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > >]â
/usr/include/boost/gil/gil_concept.hpp:886: instantiated from âvoid
boost::gil::PixelConcept<P>::constraints() [with P =
boost::gil::pixel<unsigned char,
boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > >]â
/usr/include/boost/concept/detail/has_constraints.hpp:40: instantiated
from âconst bool
boost::concept::not_satisfied<boost::gil::PixelConcept<boost::gil::pixel<unsigned
char, boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > > >::valueâ
/usr/include/boost/concept/detail/has_constraints.hpp:43: instantiated
from
âboost::concept::not_satisfied<boost::gil::PixelConcept<boost::gil::pixel<unsigned
char, boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > > >â
/usr/include/boost/mpl/if.hpp:67: instantiated from
âboost::mpl::if_<boost::concept::not_satisfied<boost::gil::PixelConcept<boost::gil::pixel<unsigned
char, boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > > >,
boost::concept::constraint<boost::gil::PixelConcept<boost::gil::pixel<unsigned
char, boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > > >,
boost::concept::requirement<boost::gil::PixelConcept<boost::gil::pixel<unsigned
char, boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > > > >â
/usr/include/boost/concept/detail/general.hpp:19: instantiated from
âboost::concept::requirement_<void
(*)(boost::gil::PixelConcept<boost::gil::pixel<unsigned char,
boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > >)>â
/usr/include/boost/concept_check.hpp:43: instantiated from âvoid
boost::function_requires(Model*) [with Model =
boost::gil::PixelConcept<boost::gil::pixel<unsigned char,
boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > >]â
/usr/include/boost/gil/gil_concept.hpp:107: instantiated from âvoid
boost::gil::gil_function_requires() [with C =
boost::gil::PixelConcept<boost::gil::pixel<unsigned char,
boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > >]â
/usr/include/boost/gil/gil_concept.hpp:971: instantiated from âvoid
boost::gil::PixelValueConcept<P>::constraints() [with P =
boost::gil::pixel<unsigned char,
boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > >]â
/usr/include/boost/concept/detail/has_constraints.hpp:40: instantiated
from âconst bool
boost::concept::not_satisfied<boost::gil::PixelValueConcept<boost::gil::pixel<unsigned
char, boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > > >::valueâ
/usr/include/boost/concept/detail/has_constraints.hpp:43: instantiated
from
âboost::concept::not_satisfied<boost::gil::PixelValueConcept<boost::gil::pixel<unsigned
char, boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > > >â
/usr/include/boost/mpl/if.hpp:67: instantiated from
âboost::mpl::if_<boost::concept::not_satisfied<boost::gil::PixelValueConcept<boost::gil::pixel<unsigned
char, boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > > >,
boost::concept::constraint<boost::gil::PixelValueConcept<boost::gil::pixel<unsigned
char, boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > > >,
boost::concept::requirement<boost::gil::PixelValueConcept<boost::gil::pixel<unsigned
char, boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > > > >â
/usr/include/boost/concept/detail/general.hpp:19: instantiated from
âboost::concept::requirement_<void
(*)(boost::gil::PixelValueConcept<boost::gil::pixel<unsigned char,
boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > >)>â
/usr/include/boost/concept_check.hpp:43: instantiated from âvoid
boost::function_requires(Model*) [with Model =
boost::gil::PixelValueConcept<boost::gil::pixel<unsigned char,
boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > >]â
/usr/include/boost/gil/gil_concept.hpp:107: instantiated from âvoid
boost::gil::gil_function_requires() [with C =
boost::gil::PixelValueConcept<boost::gil::pixel<unsigned char,
boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > > >]â
/usr/include/boost/gil/gil_concept.hpp:1203: instantiated from âvoid
boost::gil::PixelIteratorConcept<Iterator>::constraints() [with Iterator
= boost::gil::gray8_pixel_t*]â
/usr/include/boost/concept/detail/has_constraints.hpp:40: instantiated
from âconst bool
boost::concept::not_satisfied<boost::gil::PixelIteratorConcept<boost::gil::gray8_pixel_t*>
>::valueâ
/usr/include/boost/concept/detail/has_constraints.hpp:43: instantiated
from
âboost::concept::not_satisfied<boost::gil::PixelIteratorConcept<boost::gil::gray8_pixel_t*>
>â
/usr/include/boost/mpl/if.hpp:67: instantiated from
âboost::mpl::if_<boost::concept::not_satisfied<boost::gil::PixelIteratorConcept<boost::gil::gray8_pixel_t*>
>,
boost::concept::constraint<boost::gil::PixelIteratorConcept<boost::gil::gray8_pixel_t*>
>,
boost::concept::requirement<boost::gil::PixelIteratorConcept<boost::gil::gray8_pixel_t*>
> >â
/usr/include/boost/concept/detail/general.hpp:19: instantiated from
âboost::concept::requirement_<void
(*)(boost::gil::PixelIteratorConcept<boost::gil::gray8_pixel_t*>)>â
/usr/include/boost/concept_check.hpp:43: instantiated from âvoid
boost::function_requires(Model*) [with Model =
boost::gil::PixelIteratorConcept<boost::gil::gray8_pixel_t*>]â
/usr/include/boost/gil/gil_concept.hpp:107: instantiated from âvoid
boost::gil::gil_function_requires() [with C =
boost::gil::PixelIteratorConcept<boost::gil::gray8_pixel_t*>]â
/usr/include/boost/gil/gil_concept.hpp:1608: instantiated from âvoid
boost::gil::PixelLocatorConcept<Loc>::constraints() [with Loc =
boost::gil::memory_based_2d_locator<boost::gil::memory_based_step_iterator<boost::gil::gray8_pixel_t*>
>]â
/usr/include/boost/concept/detail/has_constraints.hpp:40: instantiated
from âconst bool
boost::concept::not_satisfied<boost::gil::PixelLocatorConcept<boost::gil::memory_based_2d_locator<boost::gil::memory_based_step_iterator<boost::gil::gray8_pixel_t*>
> > >::valueâ
/usr/include/boost/concept/detail/has_constraints.hpp:43: instantiated
from
âboost::concept::not_satisfied<boost::gil::PixelLocatorConcept<boost::gil::memory_based_2d_locator<boost::gil::memory_based_step_iterator<boost::gil::gray8_pixel_t*>
> > >â
/usr/include/boost/mpl/if.hpp:67: instantiated from
âboost::mpl::if_<boost::concept::not_satisfied<boost::gil::PixelLocatorConcept<boost::gil::memory_based_2d_locator<boost::gil::memory_based_step_iterator<boost::gil::gray8_pixel_t*>
> > >,
boost::concept::constraint<boost::gil::PixelLocatorConcept<boost::gil::memory_based_2d_locator<boost::gil::memory_based_step_iterator<boost::gil::gray8_pixel_t*>
> > >,
boost::concept::requirement<boost::gil::PixelLocatorConcept<boost::gil::memory_based_2d_locator<boost::gil::memory_based_step_iterator<boost::gil::gray8_pixel_t*>
> > > >â
/usr/include/boost/concept/detail/general.hpp:19: instantiated from
âboost::concept::requirement_<void
(*)(boost::gil::PixelLocatorConcept<boost::gil::memory_based_2d_locator<boost::gil::memory_based_step_iterator<boost::gil::gray8_pixel_t*>
> >)>â
/usr/include/boost/gil/iterator_from_2d.hpp:57: instantiated from
âboost::gil::iterator_from_2d<boost::gil::memory_based_2d_locator<boost::gil::memory_based_step_iterator<boost::gil::gray8_pixel_t*>
> >â
/usr/include/boost/gil/algorithm.hpp:482: instantiated from âvoid
boost::gil::destruct_pixels(const View&) [with View =
boost::gil::image_view<boost::gil::memory_based_2d_locator<boost::gil::memory_based_step_iterator<boost::gil::gray8_pixel_t*>
> >]â
/usr/include/boost/gil/image.hpp:128: instantiated from
âboost::gil::image<Pixel, IsPlanar, Alloc>::~image() [with Pixel =
boost::gil::pixel<unsigned char,
boost::gil::layout<boost::mpl::vector1<boost::gil::gray_color_t>,
boost::mpl::range_c<int, 0, 1> > >, bool IsPlanar = false, Alloc =
std::allocator<unsigned char>]â
gil_use_concept.cpp:6: instantiated from here
/usr/include/boost/mpl/at.hpp:42: error: âtemplate<class Sequence, long
int N> struct boost::mpl::at_câ is not a function,
/usr/include/boost/gil/color_base.hpp:386: error: conflict with
âtemplate<int K, class E, class L, int N> typename
boost::add_reference<E>::type
boost::gil::at_c(boost::gil::detail::homogeneous_color_base<E, L, N>&)â
/usr/include/boost/gil/gil_concept.hpp:621: error: in call to âat_câ
mloskot_at_dog:~/workshop/gil$
########################################################################
Best regards,
-- Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo, http://osgeo.org Member of ACCU, http://accu.org
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net