Boost logo

Boost :

From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2003-01-12 01:26:36


----- Original Message -----
From: "Paul Mensonides" <pmenso57_at_[hidden]>

> Actually, this works too:

So does this:

template<class> struct is_ptr_to_mem_fun {
    enum { value = false };
};

template<class R, class O> struct is_ptr_to_mem_fun<R O::*> {
    private:
        template<class U> static char check(const U O::*);
        template<class U> static char (& check(...))[2];
    public:
        enum { value = sizeof(check<R>(0)) != 1 };
};

Paul Mensonides


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