Changeset 54782


Ignore:
Timestamp:
Jul 7, 2009, 9:45:47 PM (9 years ago)
Author:
Christopher Schmidt
Message:

the algorithm helper classes no honor the r- and lvalue-ness of their arguments.

Location:
sandbox/SOC/2009/fusion
Files:
2 deleted
20 edited

Legend:

Unmodified
Added
Removed
  • sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/fold.hpp

    r54728 r54782  
    3838        {};
    3939
    40         template<typename It0Ref, typename State, typename F, int N>
     40        template<typename It0Ref, typename StateRef, typename FRef, int N>
    4141        struct result_of_unrolled_fold;
    4242
  • sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/for_each.hpp

    r54728 r54782  
    2727        static void call(It0 const& it0, BOOST_FUSION_R_ELSE_LREF(F) f)
    2828        {
     29            typedef typename result_of::next<It0 const&>::type It1;
     30            It1 it1(fusion::next(it0));
     31            typedef typename result_of::next<It1&>::type It2;
     32            It2 it2(fusion::next(it1));
     33            typedef typename result_of::next<It2&>::type It3;
     34            It3 it3(fusion::next(it2));
     35
    2936            f(fusion::deref(it0));
    30 
    31             typedef typename result_of::next<It0>::type It1;
    32             It1 it1(fusion::next(it0));
    3337            f(fusion::deref(it1));
    34 
    35             typedef typename result_of::next<It1>::type It2;
    36             It2 it2(fusion::next(it1));
    3738            f(fusion::deref(it2));
    38 
    39             typedef typename result_of::next<It2>::type It3;
    40             It3 it3(fusion::next(it2));
    4139            f(fusion::deref(it3));
    4240
     
    5351        static void call(It0 const& it0, BOOST_FUSION_R_ELSE_LREF(F) f)
    5452        {
     53            typedef typename result_of::next<It0 const&>::type It1;
     54            It1 it1(fusion::next(it0));
     55            typedef typename result_of::next<It1&>::type It2;
     56            It2 it2(fusion::next(it1));
     57
    5558            f(fusion::deref(it0));
    56 
    57             typedef typename result_of::next<It0>::type It1;
    58             It1 it1(fusion::next(it0));
    5959            f(fusion::deref(it1));
    60 
    61             typedef typename result_of::next<It1>::type It2;
    62             It2 it2(fusion::next(it1));
    6360            f(fusion::deref(it2));
    6461        }
     
    7168        static void call(It0 const& it0, BOOST_FUSION_R_ELSE_LREF(F) f)
    7269        {
     70            typedef typename result_of::next<It0 const&>::type It1;
     71            It1 it1(fusion::next(it0));
     72
    7373            f(fusion::deref(it0));
    74 
    75             typedef typename result_of::next<It0>::type It1;
    76             It1 it1(fusion::next(it0));
    7774            f(fusion::deref(it1));
    7875        }
  • sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/all.hpp

    r54548 r54782  
    1010#define BOOST_FUSION_ALGORITHM_QUERY_ALL_HPP
    1111
    12 #include <boost/fusion/support/category_of.hpp>
     12#include <boost/fusion/sequence/intrinsic/begin.hpp>
     13#include <boost/fusion/sequence/intrinsic/size.hpp>
    1314#include <boost/fusion/support/ref.hpp>
    1415
     
    3031    all(BOOST_FUSION_R_ELSE_LREF(Seq) seq, BOOST_FUSION_R_ELSE_LREF(F) f)
    3132    {
    32         return detail::all(
    33                 BOOST_FUSION_FORWARD(Seq,seq),
    34                 BOOST_FUSION_FORWARD(F,f),
    35                 typename traits::category_of<
    36                     BOOST_FUSION_R_ELSE_LREF(Seq)
    37                 >::type());
     33        return
     34            detail::unrolled_all<
     35                result_of::size<BOOST_FUSION_R_ELSE_LREF(Seq)>::value
     36            >::call(
     37                    fusion::begin(BOOST_FUSION_FORWARD(Seq,seq))
     38                  , BOOST_FUSION_FORWARD(F,f));
    3839    }
    3940}}
  • sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/any.hpp

    r54655 r54782  
    1111#define BOOST_FUSION_ALGORITHM_QUERY_ANY_HPP
    1212
    13 #include <boost/fusion/support/category_of.hpp>
     13#include <boost/fusion/algorithm/query/all.hpp>
    1414#include <boost/fusion/support/ref.hpp>
    15 
    16 #include <boost/fusion/algorithm/query/detail/any.hpp>
    1715
    1816namespace boost { namespace fusion
    1917{
     18    namespace detail
     19    {
     20        template<typename FRef>
     21        struct any_helper
     22        {
     23            typedef bool result_type;
     24
     25            any_helper(FRef f)
     26              : f(f)
     27            {}
     28
     29            template<typename E>
     30            inline bool
     31            operator()(BOOST_FUSION_R_ELSE_LREF(E) e)
     32            {
     33                return !f(BOOST_FUSION_FORWARD(E,e));
     34            }
     35
     36            FRef f;
     37        };
     38    }
     39
    2040    namespace result_of
    2141    {
     
    3151    any(BOOST_FUSION_R_ELSE_LREF(Seq) seq, BOOST_FUSION_R_ELSE_LREF(F) f)
    3252    {
    33         return detail::any(
     53        return !all(
    3454                BOOST_FUSION_FORWARD(Seq,seq),
    35                 BOOST_FUSION_FORWARD(F,f),
    36                 typename traits::category_of<
    37                     BOOST_FUSION_R_ELSE_LREF(Seq)
    38                 >::type());
     55                detail::any_helper<BOOST_FUSION_R_ELSE_LREF(F)>(f));
    3956    }
    4057}}
  • sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/count.hpp

    r54655 r54782  
    3232        return fusion::count_if(
    3333                BOOST_FUSION_FORWARD(Seq,seq),
    34                 detail::count_compare<BOOST_FUSION_R_ELSE_LREF(T)>(x));
     34                detail::count_helper<BOOST_FUSION_R_ELSE_LREF(T)>(x));
    3535    }
    3636}}
  • sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/count_if.hpp

    r54777 r54782  
    3030            operator()(BOOST_FUSION_R_ELSE_LREF(E) e, int count)
    3131            {
    32                 if(f(BOOST_FUSION_FORWARD(E,e)))
    33                 {
    34                     return count+1;
    35                 }
    36 
    37                 return count;
     32                return f(BOOST_FUSION_FORWARD(E,e)) ? ++count : count;
    3833            }
    3934
  • sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/all.hpp

    r54728 r54782  
    1010#define BOOST_FUSION_ALGORITHM_QUERY_DETAIL_ALL_HPP
    1111
    12 #include <boost/fusion/sequence/intrinsic/empty.hpp>
    13 #include <boost/fusion/sequence/intrinsic/size.hpp>
    14 #include <boost/fusion/sequence/intrinsic/begin.hpp>
    15 #include <boost/fusion/sequence/intrinsic/end.hpp>
    1612#include <boost/fusion/iterator/advance.hpp>
    1713#include <boost/fusion/iterator/equal_to.hpp>
     
    2117#include <boost/mpl/bool.hpp>
    2218
    23 //TODO code based on fold!!!
    24 
    2519namespace boost { namespace fusion { namespace detail
    2620{
    27     template <typename SeqRef, typename First, typename F>
    28     inline bool
    29     linear_all(First const&, BOOST_FUSION_R_ELSE_LREF(F), mpl::true_)
    30     {
    31         return true;
    32     }
    33 
    34     template <typename SeqRef,typename First, typename F>
    35     inline bool
    36     linear_all(First const& first, BOOST_FUSION_R_ELSE_LREF(F) f, mpl::false_)
    37     {
    38         return f(fusion::deref(first)) &&
    39             detail::linear_all(
    40                     fusion::next(first)
    41                   , BOOST_FUSION_FORWARD(F,f)
    42                   , result_of::equal_to<
    43                         typename result_of::next<First>::type,
    44                         typename result_of::end<SeqRef>::type
    45                     >::type());
    46     }
    47 
    48     template <typename Seq, typename F, typename Tag>
    49     inline bool
    50     all(BOOST_FUSION_R_ELSE_LREF(Seq) seq, BOOST_FUSION_R_ELSE_LREF(F) f, Tag)
    51     {
    52         return detail::linear_all<BOOST_FUSION_R_ELSE_LREF(Seq)>(
    53                 fusion::begin(BOOST_FUSION_FORWARD(Seq,seq))
    54               , BOOST_FUSION_FORWARD(F,f)
    55               , result_of::empty<BOOST_FUSION_R_ELSE_LREF(Seq)>::type());
    56     }
    57 
    5821    template<int N>
    5922    struct unrolled_all
    6023    {
    61         template <typename It, typename F>
    62         static bool call(It const& it, BOOST_FUSION_R_ELSE_LREF(F) f)
     24        template <typename It0, typename F>
     25        static bool
     26        call(It0 const& it0, BOOST_FUSION_R_ELSE_LREF(F) f)
    6327        {
    64             return
    65                 f(fusion::deref(it)) &&
    66                 f(fusion::deref(fusion::advance_c<1>(it)))&&
    67                 f(fusion::deref(fusion::advance_c<2>(it))) &&
    68                 f(fusion::deref(fusion::advance_c<3>(it))) &&
    69                 detail::unrolled_all<N-4>::call(fusion::advance_c<4>(it), f);
     28            if(!f(fusion::deref(it0)))
     29            {
     30                return false;
     31            }
     32
     33            typedef typename result_of::next<It0 const&>::type It1;
     34            It1 it1 = fusion::next(it0);
     35            if(!f(fusion::deref(it1)))
     36            {
     37                return false;
     38            }
     39
     40            typedef typename result_of::next<It1&>::type It2;
     41            It2 it2 = fusion::next(it1);
     42            if(!f(fusion::deref(it2)))
     43            {
     44                return false;
     45            }
     46
     47            typedef typename result_of::next<It2&>::type It3;
     48            It3 it3 = fusion::next(it3);
     49            if(!f(fusion::deref(it3)))
     50            {
     51                return false;
     52            }
     53
     54            return detail::unrolled_all<N-4>::call(
     55                    fusion::next(it3)
     56                  , BOOST_FUSION_FORWARD(F,f));
    7057        }
    7158    };
     
    7461    struct unrolled_all<3>
    7562    {
    76         template <typename It, typename F>
    77         static bool call(It const& it, BOOST_FUSION_R_ELSE_LREF(F) f)
     63        template <typename It0, typename F>
     64        static bool
     65        call(It0 const& it0, BOOST_FUSION_R_ELSE_LREF(F) f)
    7866        {
    79             return
    80                 f(fusion::deref(it)) &&
    81                 f(fusion::deref(fusion::advance_c<1>(it))) &&
    82                 f(fusion::deref(fusion::advance_c<2>(it)));
     67            if(!f(fusion::deref(it0)))
     68            {
     69                return false;
     70            }
     71
     72            typedef typename result_of::next<It0 const&>::type It1;
     73            It1 it1 = fusion::next(it0);
     74            if(!f(fusion::deref(it1)))
     75            {
     76                return false;
     77            }
     78
     79            typedef typename result_of::next<It1&>::type It2;
     80            It2 it2 = fusion::next(it1);
     81            return f(fusion::deref(it2));
    8382        }
    8483    };
     
    8786    struct unrolled_all<2>
    8887    {
    89         template <typename It, typename F>
    90         static bool call(It const& it, BOOST_FUSION_R_ELSE_LREF(F) f)
     88        template <typename It0, typename F>
     89        static bool
     90        call(It0 const& it0, BOOST_FUSION_R_ELSE_LREF(F) f)
    9191        {
    92             return
    93                 f(fusion::deref(it)) &&
    94                 f(fusion::deref(fusion::advance_c<1>(it)));
     92            if(!f(fusion::deref(it0)))
     93            {
     94                return false;
     95            }
     96
     97            typedef typename result_of::next<It0 const&>::type It1;
     98            It1 it1 = fusion::next(it0);
     99            return f(fusion::deref(it1));
    95100        }
    96101    };
     
    99104    struct unrolled_all<1>
    100105    {
    101         template <typename It, typename F>
    102         static bool call(It const& it, BOOST_FUSION_R_ELSE_LREF(F) f)
     106        template <typename It0, typename F>
     107        static bool
     108        call(It0 const& it0, BOOST_FUSION_R_ELSE_LREF(F) f)
    103109        {
    104             return f(fusion::deref(it));
     110            return f(fusion::deref(it0));
    105111        }
    106112    };
     
    109115    struct unrolled_all<0>
    110116    {
    111         template <typename It, typename F>
    112         static bool call(It const& it, F const& f)
     117        template <typename It0, typename F>
     118        static bool
     119        call(It0 const& it0, F const& f)
    113120        {
    114121            return false;
    115122        }
    116123    };
    117 
    118     template <typename Seq, typename F>
    119     inline bool
    120     all(BOOST_FUSION_R_ELSE_LREF(Seq) seq,
    121             BOOST_FUSION_R_ELSE_LREF(F) f,
    122             random_access_traversal_tag)
    123     {
    124         typedef
    125             detail::unrolled_all<
    126                 result_of::size<BOOST_FUSION_R_ELSE_LREF(Seq)>::value
    127             >
    128         gen;
    129 
    130         return gen::call(
    131                 fusion::begin(BOOST_FUSION_FORWARD(Seq,seq)),
    132                 BOOST_FUSION_FORWARD(F,f));
    133     }
    134124}}}
    135125
  • sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/count.hpp

    r54548 r54782  
    99#define BOOST_FUSION_ALGORITHM_QUERY_DETAIL_COUNT_HPP
    1010
    11 #include <boost/mpl/or.hpp>
    1211#include <boost/type_traits/is_convertible.hpp>
    1312
     
    4241
    4342    template <typename T1Ref>
    44     struct count_compare
     43    struct count_helper
    4544    {
    46         count_compare(T1Ref x)
     45        count_helper(T1Ref x)
    4746          : x(x)
    4847        {}
  • sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/find_if.hpp

    r54548 r54782  
    2121#include <boost/mpl/eval_if.hpp>
    2222#include <boost/mpl/or.hpp>
    23 #include <boost/mpl/lambda.hpp>
    2423#include <boost/mpl/apply.hpp>
    2524#include <boost/mpl/identity.hpp>
    2625
     26//TODO cschmidt: is this really worth the effort?
     27
    2728namespace boost { namespace fusion {
    2829    struct random_access_traversal_tag;
     30
    2931namespace detail
    3032{
     
    201203                First
    202204              , Last
    203               , typename mpl::lambda<Pred>::type
     205              , Pred
    204206              , is_base_of<
    205207                    random_access_traversal_tag
  • sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/replace_if.hpp

    r54686 r54782  
    4646    };
    4747
    48     //TODO !!!
    4948    template <typename F, typename NewValue>
    50     struct replacer_if
     49    struct replace_if_helper
    5150    {
    52         replacer_if(BOOST_FUSION_R_ELSE_CLREF(replacer_if) replacer)
    53           : f(BOOST_FUSION_FORWARD(
    54                   BOOST_FUSION_R_ELSE_CLREF(replacer_if),replacer).f)
    55           , new_value(BOOST_FUSION_FORWARD(
    56                   BOOST_FUSION_R_ELSE_CLREF(replacer_if),replacer).new_value)
    57         {}
    58 
    59         template<typename OtherF, typename OtherNewValue>
    60         replacer_if(
    61                 BOOST_FUSION_R_ELSE_LREF(OtherF) other_f,
    62                 BOOST_FUSION_R_ELSE_LREF(OtherNewValue) other_new_value)
    63           : f(BOOST_FUSION_FORWARD(OtherF,other_f))
    64           , new_value(BOOST_FUSION_FORWARD(OtherNewValue,other_new_value))
    65         {}
    66 
    6751        template<typename Params>
    6852        struct result;
    6953
    7054        template <typename U>
    71         struct result<replacer_if<F, NewValue>(U)>
     55        struct result<replace_if_helper<F, NewValue>(U)>
    7256        {
    7357            typedef typename
     
    8367        };
    8468
     69        template<typename OtherF, typename OtherNewValue>
     70        replace_if_helper(
     71                BOOST_FUSION_R_ELSE_LREF(OtherF) other_f,
     72                BOOST_FUSION_R_ELSE_LREF(OtherNewValue) other_new_value)
     73          : f(BOOST_FUSION_FORWARD(OtherF,other_f))
     74          , new_value(BOOST_FUSION_FORWARD(OtherNewValue,other_new_value))
     75        {}
     76
     77        template<typename Replacer>
     78        replace_if_helper(BOOST_FUSION_R_ELSE_LREF(Replacer) replacer)
     79          : f(BOOST_FUSION_FORWARD(Replacer,replacer).f)
     80          , new_value(BOOST_FUSION_FORWARD(Replacer,replacer).new_value)
     81        {}
     82
     83        template<typename Replacer>
     84        replace_if_helper&
     85        operator=(BOOST_FUSION_R_ELSE_LREF(Replacer) replacer)
     86        {
     87            f=BOOST_FUSION_FORWARD(Replacer,replacer).f;
     88            new_value=BOOST_FUSION_FORWARD(Replacer,replacer).new_value;
     89            return *this;
     90        }
     91
    8592        template <typename U>
    86         typename result<replacer_if(U)>::type
     93        typename result<replace_if_helper(U)>::type
    8794        operator()(BOOST_FUSION_R_ELSE_LREF(U) x) const
    8895        {
  • sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/erase.hpp

    r54777 r54782  
    1818#include <boost/mpl/eval_if.hpp>
    1919#include <boost/mpl/identity.hpp>
    20 #include <boost/type_traits/add_const.hpp>
    2120
    2221namespace boost { namespace fusion
  • sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/remove.hpp

    r54777 r54782  
    1010
    1111#include <boost/fusion/view/filter_view/filter_view.hpp>
     12
    1213#include <boost/mpl/not.hpp>
     14#include <boost/mpl/placeholders.hpp>
    1315#include <boost/type_traits/is_same.hpp>
    1416
  • sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/replace.hpp

    r54694 r54782  
    99#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_REPLACE_HPP
    1010
    11 #include <boost/fusion/view/transform_view/transform_view.hpp>
    1211#include <boost/fusion/algorithm/transformation/replace_if.hpp>
    1312#include <boost/fusion/support/ref.hpp>
     
    1817namespace boost { namespace fusion
    1918{
     19    namespace detail
     20    {
     21        template <typename OldValue>
     22        struct replace_helper
     23        {
     24            template <typename OtherOldValue>
     25            replace_helper(
     26                    BOOST_FUSION_R_ELSE_LREF(OtherOldValue) old_value
     27                  , int)
     28              : old_value(BOOST_FUSION_FORWARD(OtherOldValue,old_value))
     29            {}
     30
     31            template<typename Replacer>
     32            replace_helper(BOOST_FUSION_R_ELSE_LREF(Replacer) replacer)
     33              : old_value(BOOST_FUSION_FORWARD(Replacer,replacer).old_value)
     34            {}
     35
     36            template<typename Replacer>
     37            replace_helper&
     38            operator=(BOOST_FUSION_R_ELSE_LREF(Replacer) replacer)
     39            {
     40                old_value=BOOST_FUSION_FORWARD(Replacer,replacer).old_value;
     41                return *this;
     42            }
     43
     44            template <typename U>
     45            bool
     46            operator()(BOOST_FUSION_R_ELSE_LREF(U) x) const
     47            {
     48                return x==old_value;
     49            }
     50
     51            OldValue old_value;
     52        };
     53    }
     54
    2055    namespace result_of
    2156    {
    22     //TODO New arg?!
     57        //TODO New arg?!
    2358        template <typename Seq, typename OldValue, typename NewValue>
    2459        struct replace
    25           : replace_if<
    26                 Seq
    27               , BOOST_FUSION_R_ELSE_CLREF(
    28                     detail::replacer<
    29                         typename detail::as_fusion_element<OldValue>::type
    30                     >)
    31               , NewValue
    32             >
    3360        {
     61            typedef
     62                detail::replace_helper<
     63                    typename detail::as_fusion_element<OldValue>::type
     64                >
     65            replacer;
     66
     67            typedef typename replace_if<Seq, replacer, NewValue>::type type;
    3468        };
    3569    }
     
    5286              , BOOST_FUSION_R_ELSE_CLREF(OldValue)
    5387              , BOOST_FUSION_R_ELSE_CLREF(NewValue)
    54             >::type
    55         type;
    56         typedef
    57             detail::replacer<
    58                 typename detail::as_fusion_element<
    59                     BOOST_FUSION_R_ELSE_CLREF(OldValue)
    60                 >::type
    61             >
     88            >::replacer
    6289        replacer;
    6390
  • sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/replace_if.hpp

    r54777 r54782  
    1212#include <boost/fusion/support/ref.hpp>
    1313#include <boost/fusion/support/detail/as_fusion_element.hpp>
    14 
    15 #include <boost/type_traits/add_const.hpp>
    16 
    1714#include <boost/fusion/algorithm/transformation/detail/replace_if.hpp>
    1815
     
    2522        {
    2623            typedef
    27                 detail::replacer_if<
     24                detail::replace_if_helper<
    2825                    typename detail::as_fusion_element<F>::type
    2926                  , typename detail::as_fusion_element<T>::type
     
    5451
    5552        return typename result::type(BOOST_FUSION_FORWARD(Seq,seq),
    56                 typename result::replacer(BOOST_FUSION_FORWARD(F,pred),
    57                         BOOST_FUSION_FORWARD(NewValue,new_value)));
     53                typename result::replacer(
     54                    BOOST_FUSION_FORWARD(F,pred),
     55                    BOOST_FUSION_FORWARD(NewValue,new_value)));
    5856    }
    5957}}
  • sandbox/SOC/2009/fusion/boost/fusion/container/list/cons_iterator.hpp

    r54655 r54782  
    1212#include <boost/fusion/support/iterator_base.hpp>
    1313#include <boost/fusion/container/list/list_fwd.hpp>
    14 #include <boost/type_traits/add_const.hpp>
    1514
    1615#include <boost/fusion/container/list/detail/cons/deref_impl.hpp>
  • sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/pp/lookup_key.hpp

    r54655 r54782  
    99#define BOOST_FUSION_CONTAINER_MAP_DETAIL_PP_LOOKUP_KEY_HPP
    1010
    11 #include <boost/type_traits/add_const.hpp>
    1211#include <boost/type_traits/add_reference.hpp>
    1312#include <boost/fusion/support/detail/pp/unknown_key.hpp>
  • sandbox/SOC/2009/fusion/boost/fusion/container/map/map.hpp

    r54672 r54782  
    3535#include <boost/mpl/identity.hpp>
    3636#include <boost/type_traits/is_same.hpp>
     37#include <boost/type_traits/add_const.hpp>
    3738
    3839namespace boost { namespace fusion
  • sandbox/SOC/2009/fusion/boost/fusion/support/detail/pp/void.hpp

    r54777 r54782  
    1111namespace boost { namespace fusion
    1212{
    13     struct void_ {};
     13    struct void_
     14    {};
    1415}}
    1516
  • sandbox/SOC/2009/fusion/libs/fusion/example/extension/example_struct_iterator.hpp

    r54548 r54782  
    1313#include <boost/fusion/support/tag_of_fwd.hpp>
    1414#include <boost/mpl/int.hpp>
    15 #include <boost/type_traits/add_const.hpp>
    1615#include <boost/static_assert.hpp>
    1716
  • sandbox/SOC/2009/fusion/libs/fusion/example/test/main.cpp

    r54686 r54782  
    2020struct moveable
    2121{
    22     moveable()=default;
    23     moveable(const moveable&)=delete;
     22    moveable(int){};
    2423    moveable(moveable&&){}
     24    moveable& operator=(moveable&&){return *this;}
     25    moveable()=delete;
     26    moveable(moveable const&)=delete;
     27    moveable& operator=(moveable const&)=delete;
    2528};
     29bool operator==(moveable const&, moveable const&)
     30{
     31    return true;
     32}
    2633
    2734template<class... Args>
     
    121128
    122129    {
    123         vec v;
     130        vec v(0,0,0,0,0,0,0);
    124131        vec v2=std::move(v);
    125132        //vec v2=v;
     
    143150        seq_test(reverse_view<vector<int>&&>(vector<int>()));
    144151    }
     152
     153    {
     154        using namespace fusion;
     155        vector<moveable> m(0);
     156        replace(m, moveable(0), moveable(0))=replace(m, moveable(0), moveable(0));
     157    }
    145158}
Note: See TracChangeset for help on using the changeset viewer.