Boost logo

Boost :

Subject: Re: [boost] [Iterator][Type_Erasure] Conflicting declaration. (Fix is provided.)
From: Deniz Bahadir (dbahadir_at_[hidden])
Date: 2015-07-16 16:11:22


Am 16.07.2015 um 19:39 schrieb Andrey Semashev:
> On 16.07.2015 20:19, Deniz Bahadir wrote:
>> Hi there,
>>
>> I noticed a "conflicting declaration" error when developing a program
>> which uses Boost.Program_Options and Boost.Type_Erasure.
>> Further investigation showed me, that the conflict is actually between
>> Boost.Iterator and Boost.Type_Erasure.
>>
>> A test-case which demonstrates this compiler-error is the following
>> simple two-liner:
>>
>> #include <boost/type_erasure/iterator.hpp>
>> #include <boost/iterator/iterator_adaptor.hpp>
>>
>> Clang is quite verbose and outputs the following:
>>
>> /tmp/boost-1_58/boost/iterator/iterator_adaptor.hpp:44:18: error:
>> target of using declaration conflicts with declaration already in scope
>> using iterators::use_default;
>> ^
>> /tmp/boost-1_58/boost/iterator/iterator_adaptor.hpp:40:10: note:
>> target of using declaration
>> struct use_default;
>> ^
>> /tmp/boost-1_58/boost/type_erasure/iterator.hpp:27:8: note:
>> conflicting declaration
>> struct use_default;
>> ^
>> 1 error generated.
>>
>> The fix is actually quite simple and should be applied to
>> Boost.Iterator. I already provided a pull-request [1] for this.
>>
>> I hope this fix can still make it into the upcoming 1.59 release of
>> Boost.
>
> As I'he commented in the PR, the patch is needed for Boost.TypeErasure.
> Apparently, it has not been updated for changes in Boost.Iterators in 1.57.
>

I provided another pull-request [1], this time to type_erasure. I still
hope this fix will make it into the next boost-release.

Best regards,
Deniz

[1] https://github.com/boostorg/type_erasure/pull/6


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