Fix the problems described in this thread:

http://lists.boost.org/MailArchives/boost-users/msg08656.php


[SVN r26410]
This commit is contained in:
Dave Abrahams
2004-12-03 09:55:30 +00:00
parent 68268f81eb
commit 295ae05e40
4 changed files with 43 additions and 1 deletions

View File

@ -0,0 +1,16 @@
// Copyright David Abrahams 2004. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/iterator/iterator_adaptor.hpp>
#include <utility>
struct my_iter : boost::iterator_adaptor<my_iter, std::pair<int,int> const*>
{
my_iter(std::pair<int,int> const*);
my_iter();
};
std::pair<int,int> const x(1,1);
my_iter p(&x);
int y = p->first; // operator-> attempts to return an non-const pointer