Opened 11 years ago

Closed 9 years ago

#6685 closed Feature Requests (fixed)

map_keys, map_values range adaptor specializations for MFC CMap<> and CMapStringToString

Reported by: Adam D. Walling <adam.walling@…> Owned by: Neil Groves
Milestone: To Be Determined Component: range
Version: Boost 1.49.0 Severity: Not Applicable
Keywords: range mfc map_keys adaptor Cc:

Description

While the existing MFC/ATL headers mostly work with the range algorithms and adaptors, using map_keys and map_values fails due to the return type of CMap<>::CPair etc. This provides a specialization of the select_first, select_second_const, and select_second_mutable template classes which allows CMap<> and CMapStringToString to work with the map_keys and map_values range adaptors. Due to the layout of everything, there did not seem to be an applicable place to insert this code, therefore I created a new mfc_map.hpp file under adaptors. While I am uncertain whether this is fit for the library itself, perhaps it will be of use to others who happen across this.

Attachments (1)

mfc_map.hpp (3.9 KB ) - added by Adam D. Walling <adam.walling@…> 11 years ago.
map_keys and map_values support for MFC CMap<> and CMapStringToString

Download all attachments as: .zip

Change History (2)

by Adam D. Walling <adam.walling@…>, 11 years ago

Attachment: mfc_map.hpp added

map_keys and map_values support for MFC CMap<> and CMapStringToString

comment:1 by Neil Groves, 9 years ago

Resolution: fixed
Status: newclosed

Committed to the develop branch.

Note: See TracTickets for help on using tickets.