Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2001-12-09 07:44:26


>Are you complaining about my word order? I could have written "pointer to
>member function" instead. Still, I can't detect one with type_traits if
I'm
>not mistaken.

No, I'm typing more words than I intended - I should have said: you can't
dereference a member pointer, so there are no
 references to member pointers, or types "member function". There are
obviously pointers to member functions, and as you say you can't separate
them from other pointers to members using the current type traits -
something that may well be considered a defect. BTW it's interesting that
you *can* separate "pointers to objects" from "pointers to functions" using
(in pseudocode):

is_object_pointer<T> = is_pointer<T> && is_convertible<T, const volatile
void*>
is_function_pointer<T> = is_pointer<T> && ! is_convertible<T, const
volatile void*>

I can't think of any comparable test for pointers to members though :-(

- John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/


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