Opened 10 years ago

Last modified 19 months ago

#2011 new Feature Requests

Is there a way to extract the member type of a (data) member pointer?

Reported by: Daryle Walker Owned by: John Maddock
Milestone: Boost 1.36.0 Component: type_traits
Version: Boost 1.35.0 Severity: Problem
Keywords: Cc:


Can boost::remove_pointer<T> be modified to work with pointers-to-member (data), too? For instance: remove_pointer<int *> returns the int type, but so should remove_pointer<int std::div_t::*>. Or maybe a new class template should be used.

Attachments (1)

remove_pointer.diff (912 bytes) - added by Mike <vigorous.activity@…> 19 months ago.
patch for modern compilers (not msvs and older)

Download all attachments as: .zip

Change History (3)

comment:1 Changed 5 years ago by viboes

Type: BugsFeature Requests

This seems to be a feature request.

Changed 19 months ago by Mike <vigorous.activity@…>

Attachment: remove_pointer.diff added

patch for modern compilers (not msvs and older)

comment:2 Changed 19 months ago by Mike <vigorous.activity@…>

Patch for modern compilers is pretty straightforward - add four lines of code. I've uploaded it. I do not have msvs2010 or older to implement and check patch for them.

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain John Maddock.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.