Modify

Ticket #1327 (closed Bugs: fixed)

Opened 10 years ago

Last modified 9 years ago

iterator value_type possibly cv-qualified

Reported by: Shunsuke Sogame <pstade.mb@…> Owned by: nesotto
Milestone: Boost 1.35.0 Component: ptr_container
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

boost::ptr_vector<int const>::iterator::value_type

is int const now, but it should be int.

Attachments

Change History

comment:1 follow-ups: ↓ 2 ↓ 3 Changed 9 years ago by nesotto

AFAICT, you can't even use boost::ptr_vector<int const>, because the whole library has not been designed/tested with this in mind.

Standard containers don't support this. Can you describe why it is useful?

-Thorsten

comment:2 in reply to: ↑ 1 Changed 9 years ago by Shunsuke Sogame <pstade.mb@…>

Replying to nesotto:

the whole library has not been designed/tested with this in mind.

I didn't know that. Sorry for the noise.

-- Shunsuke Sogame

comment:3 in reply to: ↑ 1 Changed 9 years ago by Shunsuke Sogame <pstade.mb@…>

Replying to nesotto:

AFAICT, you can't even use boost::ptr_vector<int const>, because the whole library has not been designed/tested with this in mind.

Sorry again.

See this:

#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/range/const_iterator.hpp>
#include <boost/mpl/assert.hpp>

int main()
{
    typedef boost::range_const_iterator< boost::ptr_vector<int> >::type citer_t;
    BOOST_MPL_ASSERT((boost::is_same<citer_t::value_type, int const>)); // pass
    BOOST_MPL_ASSERT((boost::is_same<citer_t::value_type, int>)); // failed
}

This seems a bug.

--

Shunsuke Sogame

comment:4 Changed 9 years ago by nesotto

  • Status changed from new to closed
  • Resolution set to fixed

Should be fixed...

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


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

 
Note: See TracTickets for help on using tickets.