Boost logo

Boost Users :

From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2005-11-03 07:01:56


Hello all,

I am trying to get enable if to work with Visual C++ 7.0 and boost 1.33.

for the following member function implemenation I get an error:

        template<>
                typename boost::enable_if<boost::is_pointer<_ElemFct::result_type>, _ElemFct::result_type>::type
                operator->()
        {
                return get_at(ptr_coll, pos);
        }

        template<>
                typename boost::enable_if<boost::is_reference<_ElemFct::result_type>,
boost::add_pointer<_ElemFct::result_type>::type>::type
                operator->()
        {
                return &(get_at(ptr_coll, pos));
        }

My compiler is in German. I have tried to translate the error messages...

error C2504: 'boost::enable_if_does_not_work_on_this_compiler<T>' : Base class undefined
        with
        [
            T=boost::function2<std::string &,MemberTest *,int,int>::result_type
        ]
        see reference to the instance of compiled class template 'boost::enable_if<Cond,T>'
        with
        [
            Cond=boost::is_pointer<boost::function2<std::string &,MemberTest
*,int,int>::result_type>,
            T=boost::function2<std::string &,MemberTest *,int,int>::result_type
        ]
        see reference to the instance of compiled class template
'generic_iterator<_Coll,_Ty,_ElemFct,_LenFct,_Diff,_Ptr,_Ref,_Cat>'
        with
        [
            _Coll=MemberTest,
            _Ty=std::string,
            _ElemFct=element_retrieval,
            _LenFct=length_retrieval,
            _Diff=int,
            _Ptr=std::string *,
            _Ref=std::string &,
            _Cat=std::bidirectional_iterator_tag
        ]

error C2039: 'type' : Is not an element of 'boost::enable_if<Cond,T>'
        with
        [
            Cond=boost::is_pointer<boost::function2<std::string &,MemberTest
*,int,int>::result_type>,
            T=boost::function2<std::string &,MemberTest *,int,int>::result_type
        ]

With Kind Regards,

Ovanes Markarian


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net