Boost logo

Boost Users :

Subject: Re: [Boost-users] [GIL] cannot compile a simple example with concept checking enabled
From: Christian Henning (chhenning_at_[hidden])
Date: 2010-12-23 14:40:50


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.

Regards,
Christian

On Thu, Dec 23, 2010 at 1:49 PM, Adam Romanek <a.romanek_at_[hidden]> wrote:
> 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 mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


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