Boost logo

Boost :

From: Synge Todo (wistaria_at_[hidden])
Date: 2004-07-13 00:04:42


Unfortunately, with the new iterator_facade implementation,
filesystem/src/path_posix_windows.cpp" can not compile on
Compaq Tru64 (cxx).

cxx: Error: /usr/lib/cmplrs/cxx/V6.5-034/include/cxx/algorithm.cc, line 2582:
          no operator "<" matches these operands
            operand types are: const
                      boost::detail::postfix_increment_proxy<boost::filesystem:
                      :path::iterator> < const
                      boost::detail::postfix_increment_proxy<boost::filesystem:
                      :path::iterator>
          detected during instantiation of "bool
                    std::lexicographical_compare(InputIterator1,
                    InputIterator1, InputIterator2, InputIterator2) [with
                    InputIterator1=boost::filesystem::path::iterator,
                    InputIterator2=boost::filesystem::path::iterator]"
      if (*first2++ < *first1++) return false;
--------------------^
cxx: Info: 1 error detected in the compilation of "XXX/src/boost/libs/filesystem/src/path_posix_windows.cpp".

Do you have any idea to fix this problem??

Best regards,
Synge

From: David Abrahams <dave_at_[hidden]>
Date: Sun, 11 Jul 2004 23:18:07 -0400
> David Abrahams <dave_at_[hidden]> writes:
>
> > I'm getting ready to fix the issues we've discussed with postfix ++
> > (and by extension, --) in iterator_facade. Basically, the current
> > implementation works for forward iterators but not for some input
> > iterators:
> >
> > {
> > self x = *this;
> > ++*this; // <== here
> > return x;
> > }
> >
> > The problem is that for many input iterators, all copies reference the
> > same element. The marked line increments the iterator, which causes
> > the current element of the sequence to be skipped, so
> >
> > *a++
> >
> > yields the /next/ element. To fix that, a++ needs to return a proxy
> > type.
>
> Fixed now in CVS, along with new tests.
> --
> Dave Abrahams
> Boost Consulting
> http://www.boost-consulting.com
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


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