Boost logo

Boost :

Subject: [boost] [TypeTraits] Type traits for member pointers?
From: Celtic Minstrel (celtic.minstrel.ca_at_[hidden])
Date: 2009-07-17 00:45:35


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?

--SPCD
"Celtic Minstrel"


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