
namespace bmi = boost::multi_index; .... bmi::ordered_non_unique< bmi::member< ItemBase, unsigned, &ItemBase::my_member > >, // ordered_non_unique .... I'm getting a compiler error on VS10 from template<class Class,typename Type,Type Class::*PtrToMember> struct non_const_member_base { .... Type& operator()(const ChainedPtr& x)const { return operator()(*x); } boost/multi_index/member.hpp(105): error C2440: 'return' : cannot convert from 'const unsigned int' to 'unsigned int &' It also tells me that the ChainedPtr is a shared_ptr to a const ItemBase, and I can see that _none_ of the operator()'s in that class return a non-reference. But if the compiler is already thinking ref-becomes-lvalue and leaves that out, the next form const Type& operator()(const Class& x,int=0)const { return x.*PtrToMember; } is a perfect match to *x and so I expect the return value to be in fact const (because the object being dereferencd was const) Any idea what's going on here, and what I might do about it? Our project is using Boost 1.49, though I didn't see anything in the release notes about changes to MultiIndex in later releases. —John