Boost logo

Boost :

Subject: Re: [boost] [gil::io] Dependent Name issue with VS2015 Update3
From: Christian Henning (chhenning_at_[hidden])
Date: 2017-07-01 22:42:38


Hi Andrey,

On Sat, Jul 1, 2017 at 3:51 PM, Andrey Semashev <andrey.semashev_at_[hidden]>
wrote:

> On 07/01/17 22:05, Christian Henning via Boost wrote:
>
>> Hi all,
>>
>> using the new gil::io on gil's develop branch I get a compilation error
>> with Visual Studio 2015 Update 3.
>>
>> When trying to read a tiff image:
>>
>> #include <string>
>>
>> #include <boost\gil\gil_all.hpp>
>> #include <boost\gil\extension\io\tiff_all.hpp>
>>
>> using namespace std;
>> using namespace boost::gil;
>>
>> int main()
>> {
>>
>> rgba8_image_t img;
>> read_image( string(), img, tiff_tag() );
>>
>> return 0;
>> }
>>
>> I get an error:
>>
>> error C2951: template declarations are only permitted at global,
>> namespace,
>> or class scope
>>
>>
>> The problem seems to be with
>>
>> https://github.com/boostorg/gil/blob/develop/include/boost/
>> gil/extension/io/formats/tiff/device.hpp#L143
>>
>> Can someone please tell me if my issue is a compiler issue or simply a
>> syntax error.
>>
>
> Looks like a compiler bug to me. You can try replacing
> `get_property_f::operator()` with a regular named function. Same with
> `set_property`.
>

Thanks Andrey. Stefan Seefeld had the same inclination. I'll try to rename
operator() and see if that fixes the issue.

Regards,
Christian


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk