On 15/10/2015 13:22, Joaquin M LópezMuñoz wrote:
Hi,
Boost.MultiIndex is failing at master for VC 7.1:
.\boost\multi_index\identity.hpp(75) : error C2535: 'Type &boost::multi_index::detail::const_identity_base<Type>::operator() (const boost::reference_wrapper<Type> &) const' : member function already defined or declared
the problem seemingly being with boost::is_const. The offending code looks like
template<typename Type> struct const_identity_base { // produces the error above if Type is not const };
template<typename Type> struct non_const_identity_base { ... };
template<class Type> struct identity: mpl::if_c< is_const<Type>::value, detail::const_identity_base<Type>, detail::non_const_identity_base<Type>
::type { };
Sometimes MSVC-7.1 seems to be happier with a bit more flattened template instantiation chain. Maybe if you SFINAE it with partial specialization of identity it will work. Another option is to use if_<> instead of if_c. It could make MSVC happier. Best, Ion