Boost logo

Boost Users :

From: Richard Crossley (rdc_at_[hidden])
Date: 2005-10-27 11:45:49


Hi,

Experimenting with boost::result_of under VC7.1 and 8...

---
template <typename T>
struct A{
    template <typename F>
    struct result;
    template <typename U,typename V>
    struct result<A(U,V)>{
        typedef U type;
    };
    template <typename U,typename V>
    U operator()(U const&,V const&)
    {
        return U();
    }
};
//typedef A<int>::result<A<int>(int,int)>::type result_;
typedef boost::result_of<A<int>(float,char)>::type result;
---
c:\boost\boost\utility\result_of.hpp(43) : error C2027: use of undefined
type 'A<T>::result<F>'
        with
        [
            T=int
        ]
        and
        [
            F=A<int> (float,char)
        ]
Am I actually using result_of correctly here, or have I misunderstood
something?
If the result_ typedef is uncommented then it behaves as I would expect.
Is there a way to successfully use result_of like this with VC?
Thanks,
Richard. 

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