Boost logo

Boost :

Subject: Re: [boost] [TypeTraits] Type traits for member pointers?
From: John Maddock (john_at_[hidden])
Date: 2009-07-17 11:51:03


>I recently noticed that the Boost Type Traits library does not include
> any traits for member pointers apart from identification. For example,
> there are no "add member pointer" or "remove member pointer" traits,
> nor a trait to extract the containing type from a member pointer (ie
> extract Q from T Q::*). And there is no trait for decomposing member
> function pointers.
>
> It would appear that these traits could be added fairly easily; I was
> able to create them within a few minutes, and verify that they worked
> (with g++). Is there sufficient reason to add them to the library? For
> me, completeness seems like reason enough (unless it would be a lot of
> work). On the other hand, member pointers are, as far as I know,
> rarely used.
>
> So, um... thoughts? Is it a good idea? Should I post my code?

It's been asked for before: https://svn.boost.org/trac/boost/ticket/2011,
and there's some start on this in the sandbox - see
https://svn.boost.org/trac/boost/browser/sandbox/type_traits/boost/type_traits/member_object.hpp -
however there was no general agreement over nomenclature last time this was
raised, which is largely why this is stalled - that and a lack of time on my
part :-(

John.


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