Ticket #5741: multi_index_foreach_support_fix.patch

File multi_index_foreach_support_fix.patch, 3.6 KB (added by Michel MORIN <mimomorin@…>, 11 years ago)

A patch for hashed_index, ordered_index, random_access_index and sequenced_index (against trunk).

  • boost/multi_index/sequenced_index.hpp

     
    915915
    916916} /* namespace multi_index */
    917917
     918namespace foreach{
     919  /* BOOST_FOREACH support
     920   * Tell BOOST_FOREACH to avoid copying indices.
     921   */
     922
     923template<typename T> struct is_noncopyable;
     924
     925template<typename SuperMeta,typename TagList>
     926struct is_noncopyable<
     927  multi_index::detail::sequenced_index<SuperMeta,TagList>
     928>:mpl::true_
     929{
     930};
     931
     932} /* namespace foreach */
     933
    918934} /* namespace boost */
    919935
    920936#undef BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT
  • boost/multi_index/ordered_index.hpp

     
    4646#include <boost/detail/no_exceptions_support.hpp>
    4747#include <boost/detail/workaround.hpp>
    4848#include <boost/iterator/reverse_iterator.hpp>
     49#include <boost/mpl/bool.hpp>
    4950#include <boost/mpl/if.hpp>
    5051#include <boost/mpl/push_front.hpp>
    5152#include <boost/multi_index/detail/access_specifier.hpp>
     
    13831384
    13841385} /* namespace multi_index */
    13851386
     1387namespace foreach{
     1388  /* BOOST_FOREACH support
     1389   * Tell BOOST_FOREACH to avoid copying indices.
     1390   */
     1391
     1392template<typename T> struct is_noncopyable;
     1393
     1394template<
     1395  typename KeyFromValue,typename Compare,
     1396  typename SuperMeta,typename TagList,typename Category
     1397>
     1398struct is_noncopyable<
     1399  multi_index::detail::ordered_index<
     1400    KeyFromValue,Compare,SuperMeta,TagList,Category>
     1401>:mpl::true_
     1402{
     1403};
     1404
     1405} /* namespace foreach */
     1406
    13861407} /* namespace boost */
    13871408
    13881409#undef BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT
  • boost/multi_index/hashed_index.hpp

     
    2020#include <boost/detail/no_exceptions_support.hpp>
    2121#include <boost/detail/workaround.hpp>
    2222#include <boost/limits.hpp>
     23#include <boost/mpl/bool.hpp>
    2324#include <boost/mpl/push_front.hpp>
    2425#include <boost/multi_index/detail/access_specifier.hpp>
    2526#include <boost/multi_index/detail/auto_space.hpp>
     
    12381239
    12391240} /* namespace multi_index */
    12401241
     1242namespace foreach{
     1243  /* BOOST_FOREACH support
     1244   * Tell BOOST_FOREACH to avoid copying indices.
     1245   */
     1246
     1247template<typename T> struct is_noncopyable;
     1248
     1249template<
     1250  typename KeyFromValue,typename Hash,typename Pred,
     1251  typename SuperMeta,typename TagList,typename Category
     1252>
     1253struct is_noncopyable<
     1254  multi_index::detail::hashed_index<
     1255    KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>
     1256>:mpl::true_
     1257{
     1258};
     1259
     1260} /* namespace foreach */
     1261
    12411262} /* namespace boost */
    12421263
    12431264#undef BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT
  • boost/multi_index/random_access_index.hpp

     
    10011001
    10021002} /* namespace multi_index */
    10031003
     1004namespace foreach{
     1005  /* BOOST_FOREACH support
     1006   * Tell BOOST_FOREACH to avoid copying indices.
     1007   */
     1008
     1009template<typename T> struct is_noncopyable;
     1010
     1011template<typename SuperMeta,typename TagList>
     1012struct is_noncopyable<
     1013  multi_index::detail::random_access_index<SuperMeta,TagList>
     1014>:mpl::true_
     1015{
     1016};
     1017
     1018} /* namespace foreach */
     1019
    10041020} /* namespace boost */
    10051021
    10061022#undef BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT