[GIL] cannot compile a simple example with concept checking enabled
)>’ ../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>]’
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*> 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?
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@no.pl> 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/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>]’
../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*> 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@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hi. As I wrote earlier, I use: - Ubuntu 10.04 - gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3 - boost v1.45.0 (downloaded from http://www.boost.org/) Regards, Adam W dniu 2010-12-23 20:40, Christian Henning pisze:
Hi Adam, what version of boost are you running?
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@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@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@dog:~/workshop/gil$ mloskot@dog:~/workshop/gil$ grep 'define BOOST_VERSION ' /home/mloskot/dev/boost/_svn/trunk/boost/version.hpp #define BOOST_VERSION 104600 mloskot@dog:~/workshop/gil$ mloskot@dog:~/workshop/gil$ g++ -I/home/mloskot/dev/boost/_svn/trunk gil_use_concept.cpp mloskot@dog:~/workshop/gil$ mloskot@dog:~/workshop/gil$ grep 'define BOOST_VERSION ' /usr/include/boost/version.hpp #define BOOST_VERSION 104200 mloskot@dog:~/workshop/gil$ mloskot@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@dog:~/workshop/gil$ ########################################################################
Best regards, -- Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo, http://osgeo.org Member of ACCU, http://accu.org
Hi there, sorry for the late reply. On Thu, Dec 23, 2010 at 6:16 PM, Mateusz Loskot <mateusz@loskot.net> wrote:
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:
I have downloaded boost 1.45 and still cannot recreate the problem with MSVC10 Express. Could you try to understand what the problem is? I don't have gcc available. Mateusz, why do you use boost 1.42? Regards, Christian
participants (3)
-
Adam Romanek
-
Christian Henning
-
Mateusz Loskot