Boost logo

Boost :

From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2002-11-21 21:17:38

----- Original Message -----
From: "Martin Bosticky" <mbosticky_at_[hidden]>

> I am actually working on a few function adaptors that access data members.
> However the way I phrased the question makes it look like C++ only.

template<class> struct extract_class;

template<class T, class U> struct extract_class<U T::*> {
    typedef T type;

template<class pointer_to_member_type>
void foo(pointer_to_member_type AMember)
    typedef typename extract_class<pointer_to_member_type>::type class_type;
    // ...

Paul Mensonides

Boost list run by bdawes at, gregod at, cpdaniel at, john at