Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2007-10-16 20:56:03


on Mon Oct 15 2007, "JOAQUIN LOPEZ MU?Z" <joaquin-AT-tid.es> wrote:

> I haven't gauged the full consequences of the following patch,
> but at least it shuts the compiler up on the test case provided
> in my prior post. What do you think about it?
>
> Joaquín M López Muñoz
> Telefónica, Investigación y Desarrollo
> Index: iterator_facade.hpp
> ===================================================================
> --- iterator_facade.hpp (revision 39907)
> +++ iterator_facade.hpp (working copy)
> @@ -381,7 +381,7 @@
> >
> {};
>
> - template <class Iterator, class Value, class Reference>
> + template <class Iterator, class Value, class Reference,class Difference>
> struct operator_brackets_result
> {
> typedef typename mpl::if_<
> @@ -649,8 +649,9 @@
> >::make(*this->derived());
> }
>
> - typename boost::detail::operator_brackets_result<Derived,Value,reference>::type
> - operator[](difference_type n) const
> + template<typename Difference>
> + typename boost::detail::operator_brackets_result<Derived,Value,reference,Difference>::type
> + operator[](Difference n) const
> {
> typedef boost::detail::use_operator_brackets_proxy<Value,Reference> use_proxy;
>

It itself, it looks OK. I would like to be surer that it solves the
problem completely, though, before committing it.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk