Index: boost/multi_index/sequenced_index.hpp =================================================================== --- boost/multi_index/sequenced_index.hpp (revision 73458) +++ boost/multi_index/sequenced_index.hpp (working copy) @@ -915,6 +915,22 @@ } /* namespace multi_index */ +namespace foreach{ + /* BOOST_FOREACH support + * Tell BOOST_FOREACH to avoid copying indices. + */ + +template struct is_noncopyable; + +template +struct is_noncopyable< + multi_index::detail::sequenced_index +>:mpl::true_ +{ +}; + +} /* namespace foreach */ + } /* namespace boost */ #undef BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT Index: boost/multi_index/ordered_index.hpp =================================================================== --- boost/multi_index/ordered_index.hpp (revision 73458) +++ boost/multi_index/ordered_index.hpp (working copy) @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -1383,6 +1384,26 @@ } /* namespace multi_index */ +namespace foreach{ + /* BOOST_FOREACH support + * Tell BOOST_FOREACH to avoid copying indices. + */ + +template struct is_noncopyable; + +template< + typename KeyFromValue,typename Compare, + typename SuperMeta,typename TagList,typename Category +> +struct is_noncopyable< + multi_index::detail::ordered_index< + KeyFromValue,Compare,SuperMeta,TagList,Category> +>:mpl::true_ +{ +}; + +} /* namespace foreach */ + } /* namespace boost */ #undef BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT Index: boost/multi_index/hashed_index.hpp =================================================================== --- boost/multi_index/hashed_index.hpp (revision 73458) +++ boost/multi_index/hashed_index.hpp (working copy) @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -1238,6 +1239,26 @@ } /* namespace multi_index */ +namespace foreach{ + /* BOOST_FOREACH support + * Tell BOOST_FOREACH to avoid copying indices. + */ + +template struct is_noncopyable; + +template< + typename KeyFromValue,typename Hash,typename Pred, + typename SuperMeta,typename TagList,typename Category +> +struct is_noncopyable< + multi_index::detail::hashed_index< + KeyFromValue,Hash,Pred,SuperMeta,TagList,Category> +>:mpl::true_ +{ +}; + +} /* namespace foreach */ + } /* namespace boost */ #undef BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT Index: boost/multi_index/random_access_index.hpp =================================================================== --- boost/multi_index/random_access_index.hpp (revision 73458) +++ boost/multi_index/random_access_index.hpp (working copy) @@ -1001,6 +1001,22 @@ } /* namespace multi_index */ +namespace foreach{ + /* BOOST_FOREACH support + * Tell BOOST_FOREACH to avoid copying indices. + */ + +template struct is_noncopyable; + +template +struct is_noncopyable< + multi_index::detail::random_access_index +>:mpl::true_ +{ +}; + +} /* namespace foreach */ + } /* namespace boost */ #undef BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT