decltype, result_of, or typeof?

Posted by Neil G on Stack Overflow See other posts from Stack Overflow or by Neil G
Published on 2010-05-04T08:28:53Z Indexed on 2010/05/04 8:38 UTC
Read the original article Hit count: 240

Filed under:
|
|

I have:

class A {
public:
    B           toCPD() const;

And:

template<typename T>
class Ev {
public:
    typedef result_of(T::toCPD()) D;

After instantiating Ev<A>, the compiler says:

meta.h:12: error: 'T::toCPD' is not a type

neither decltype nor typeof work either.

© Stack Overflow or respective owner

Related posts about c++

Related posts about c++0x