Re: [Boost-users] [gil] Using gil::color_converted_view with gil::for_each_pixel (Christian Henning)

Dear Christian,
2. This compiles
gil::gil_function_requires<gil::ImageViewConcept<int> >();
What do you mean? This shouldn't compile?
I was under the impression that the point of gil_function_requires is to do static checking to ensure that a type is compatible with an GIL type? (Something akin to BOOST_CONCEPT_ASSERT) Is an int supposed to be compatible with ImageViewConcept? From the GIL tutorial http://stlab.adobe.com/gil/html/giltutorial.html#GenericVersionSec, it seems like it's being used as a static type check, and int clearly isn't compatible to an image view. Am I missing something? Best regards, Chris Yuen

Hi Chris, sorry for the late reply.
2. This compiles
gil::gil_function_requires<gil::ImageViewConcept<int> >();
What do you mean? This shouldn't compile?
I was under the impression that the point of gil_function_requires is to do static checking to ensure that a type is compatible with an GIL type? (Something akin to BOOST_CONCEPT_ASSERT)
To have the static checking kick in you need to enable it by #define BOOST_GIL_USE_CONCEPT_CHECK 1 before you include gil's headers. Hope that answers your question. Regards, Christian PS: In case you have some free time at hand, please consider writing a review for my gil's io extension which is currently reviewed by the boost community. Here is the a link to the announcement: http://lists.boost.org/boost-announce/2010/11/0273.php
participants (2)
-
Chris Yuen
-
Christian Henning