If you can control the ordering, you can avoid the problem. But this solution is error prone.
Yup, can't really do this now.
Fortunately, is_noncopyable and is_lightweight_proxy customization points seem to be only used in Boost.MultiIndex. So, I think, changing the name of namespace foreach is a viable solution. (Please note that this solution can break existing codes using is_noncopyable and is_lightweight_proxy customization points.)
1. Change namespace foreach --> namespace foreach_ foreach:: --> foreach_:: in boost/foreach.hpp and boost/foreach_fwd.hpp.
2. Change foreach:: --> foreach_:: in boost/multi_index/hashed_index.hpp boost/multi_index/ordered_index.hpp boost/multi_index/random_access_index.hpp boost/multi_index/sequenced_index.hpp (and, if you want, libs/foreach/test/noncopyable.cpp).
Thanks for that suggestion, will try for sure. For now tho I just removed new code that was added to multi-index in 1.48 (to support foreach) and all seems to work OK. Cheers, Simon