Opened 11 years ago

Closed 5 months ago

#2011 closed Feature Requests (wontfix)

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:

Description

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@…> 2 years ago.
patch for modern compilers (not msvs and older)

Download all attachments as: .zip

Change History (4)

comment:1 Changed 6 years ago by viboes

Type: BugsFeature Requests

This seems to be a feature request.

Changed 2 years ago by Mike <vigorous.activity@…>

Attachment: remove_pointer.diff added

patch for modern compilers (not msvs and older)

comment:2 Changed 2 years 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.

comment:3 Changed 5 months ago by John Maddock

Resolution: wontfix
Status: newclosed

I think at this stage we need to track {std::remove_pointer}

Note: See TracTickets for help on using tickets.