Gmane
From: Richard Crossley <rdc <at> rdcdesign.com>
Subject: result_of && VC7.1
Newsgroups: gmane.comp.lib.boost.user
Date: 2005-10-27 16:45:49 GMT (2 years, 36 weeks, 3 days, 7 hours and 22 minutes ago)
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.