Opened 8 years ago

Last modified 8 years ago

#10397 assigned Bugs

compilation error with mfc-iteratior-support: ambiguous symbol

Reported by: Tobias Loew Owned by: Neil Groves
Milestone: To Be Determined Component: range
Version: Boost 1.56.0 Severity: Problem
Keywords: Cc:

Description

Hi,

moving parts of range_const_iterator to the namespace range_detail in file boost/range/const_iterator.hpp leads to ambiguity in /range/detail/mfc.hpp line 747:

(MSVC 11 on Windows Server 2008 R2/x64)

25>..\src\libs\boost\boost\boost/range/mfc.hpp(747): error C2872: 'range_const_iterator' : ambiguous symbol 25> could be '..\src\libs\boost\boost\boost/range/const_iterator.hpp(67) : boost::range_const_iterator' 25> or '..\src\libs\boost\boost\boost/range/const_iterator.hpp(40) : boost::range_detail::range_const_iterator' 25> ..\src\libs\boost\boost\boost/range/detail/microsoft.hpp(135) : see reference to class template instantiation 'boost::range_detail_microsoft::customization<Tag>::meta<X>' being compiled 25> with 25> [ 25> Tag=CEbsValueArray::mfc_range_base_type, 25> X=CTypedPtrArray<CObArray,EbsValue *> 25> ] 25> ..\src\libs\boost\boost\boost/range/begin.hpp(111) : see reference to class template instantiation 'boost::range_detail_microsoft::const_iterator_of<T>' being compiled 25> with 25> [ 25> T=CTypedPtrArray<CObArray,EbsValue *> 25> ] ...

The problem can be resolved by changing the name of

boost::range_detail::range_const_iterator

to

boost::range_detail::range_const_iterator_helper

I expect other begin/end adapters to run into the same problem.

Tobias

Change History (2)

comment:1 by Neil Groves, 8 years ago

Status: newassigned

I shall fix this during this week on the Develop branch.

comment:2 by Neil Groves, 8 years ago

After starting the resolution to this defect I decided that the unit testing is woefully inadequate for the MFC and ATL support. After looking at my Visual C++ express installation and discovering that MFC isn't included for free I have decided to start developing mock classes to emulate the ATL/MFC classes we wish to support. There are a large number of classes and I am part way through developing these.

These new mock classes will allow me to leave the tests permanently enabled even on compiler / platforms that do not have MFC and ATL. This should produce a long-term benefit to the quality of these components. I will however need a few more weeks to complete this.

Note: See TracTickets for help on using tickets.