Boost logo

Boost Users :

Subject: [Boost-users] [GIL] cannot compile a simple example with concept checking enabled
From: Adam Romanek (a.romanek_at_[hidden])
Date: 2010-12-23 13:49:00


hi, this is my first message on a mailing list so forgive me for any
mistakes.

I have a problem with compiling the following code when
BOOST_GIL_USE_CONCEPT_CHECK is defined:

#include <boost/gil/gil_concept.hpp>
#include <boost/gil/gil_all.hpp>

int main() {
     boost::gil::gray8_image_t image;
     return 0;
}

when BOOST_GIL_USE_CONCEPT_CHECK is not defined the code compiles with
no errors.

I compile the code like this: g++ -DBOOST_GIL_USE_CONCEPT_CHECK
-I../boost_1_45_0/ main.cpp

I use:
- ubuntu 10.04
- gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
- boost v1.45.0 (downloaded from boost website)

the error message from compiler is quite long and it finishes like this:

../boost_1_45_0/boost/concept/detail/general.hpp:20: instantiated from
‘boost::concepts::requirement_<void
(*)(boost::gil::PixelLocatorConcept<boost::gil::memory_based_2d_locator<boost::gil::memory_based_step_iterator<boost::gil::gray8_pixel_t*>
> >)>’
../boost_1_45_0/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*>
> >’
../boost_1_45_0/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*>
> >]’
../boost_1_45_0/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>]’
main.cpp:5: instantiated from here
../boost_1_45_0/boost/mpl/at.hpp:42: error: ‘template<class Sequence,
long int N> struct boost::mpl::at_c’ is not a function,
../boost_1_45_0/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>&)’
../boost_1_45_0/boost/gil/gil_concept.hpp:621: error: in call to ‘at_c’

can anyone help me?


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