Boost logo

Boost Users :

Subject: Re: [Boost-users] [GIL] convert image view to const image view
From: Curtis Gehman (curtis2006_at_[hidden])
Date: 2010-12-21 02:21:17


Christian,

Sorry for my unresponsiveness. I think the reason that you didn't follow me was because the question was sort of silly. I eventually realized that it's not really fair to expect the compiler to apply implicit type conversion to arguments when resolving template calls.

Hope my <foreshadowing>next question</foreshadowing> has some more substance behind it.

On Nov 30, 2010, at 7:53 AM, Christian Henning wrote:

> Hi Curtis, could you please provide a small code that exhibits your
> problem. I'm not quite following here. Are templates a solution?
>
> Thanks,
> Christian
>
> On Mon, Nov 29, 2010 at 6:23 PM, Curtis Gehman <curtis2006_at_[hidden]> wrote:
>> I originally hoped that an actual function argument of type GIL mutable
>> image view (e.g., gray8_view_t) would be automatically promoted to a
>> (immutable or const) view (e.g., gray8c_view_t). But my experience (with
>> version 1.44.0) indicates otherwise. It also seems like the const_view
>> function, which generates a (const) view from an image is not overloaded to
>> do the same using a mutable view. Obviously, I'm just getting starting
>> using GIL, since this sort of conversion would, I presume, be used often.
>> I've been searching the online documentation without success. Can someone
>> point me to the answer for this basic task? In the meantime, I'll be
>> reading the GIL header files.
>>
>> Thanks.


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