/Src/Dependencies/Boost/libs/iterator/test/constant_iter_arrow_fail.cpp
http://hadesmem.googlecode.com/ · C++ · 20 lines · 13 code · 4 blank · 3 comment · 0 complexity · 17def68e65f60ce441f3e487ee04f276 MD5 · raw file
- // 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);
- void test()
- {
- p->first = 3;
- }