Opened 15 years ago
Closed 15 years ago
#1421 closed Bugs (invalid)
ptr_map reference type is not a reference
Reported by: | Owned by: | Thorsten Ottosen | |
---|---|---|---|
Milestone: | To Be Determined | Component: | ptr_container |
Version: | Boost 1.34.1 | Severity: | Regression |
Keywords: | ptr_map, ptr_container, reference, typedef | Cc: |
Description
The "reference" typedef in ptr_map and also ptr_multimap is not defined as a reference. This can be easily demonstrated with the following code:
typedef std::map<int,int*> STDCTR; typedef boost::ptr_map<int,int> PTRCTR; bool isrefstdit = boost::is_reference<STDCTR::iterator::reference>::value; bool isrefstdval = boost::is_reference<STDCTR::reference>::value; bool isrefptrit = boost::is_reference<PTRCTR::iterator::reference>::value; bool isrefptrval = boost::is_reference<PTRCTR::reference>::value;
is_reference returns true for std::map, but false for boost::ptr_map. This was correct in v1.33.1, but is not in v1.34.1.
Note:
See TracTickets
for help on using tickets.
This cannot be achieved with the current design because the reference type is a proxy object.
-Thorsten