Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-01-12 20:03:14


"Paul Mensonides" <pmenso57_at_[hidden]> writes:

>
>> GCC thinks it's illegal.
>
> Which part?

Sorry, I miswrote. It fails to match the template:

template<class> struct test;

template<class R, class C> struct test<R C::*> {
    typedef R type;
};

struct X { };

int main()
{
    test< void (X::*)(int) >::type // what type is this?
        ints;
}

foo.cpp:13: incomplete type `test<void (X::*)(int)>' does not have member `type

-- 
                       David Abrahams
   dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk