Opened 10 years ago

#7310 new Bugs

filesystem::path::iterator::operator+ is unusable due to compile error

Reported by: Craig Dickson <cdickson@…> Owned by: Beman Dawes
Milestone: To Be Determined Component: filesystem
Version: Boost 1.50.0 Severity: Problem
Keywords: path iterator Cc:

Description

Boost 1.50, MS Visual Studio 2010. I find that if I attempt to use the + operator on a path::iterator, I get a compiler error saying that the method "advance" is not part of path::iterator. If I comment out my use of this operator, and instead use only ++, then everything compiles.

Here are the details from the compiler:

boost/iterator/iterator_facade.hpp(544): error C2039: 'advance' : is not a member of 'boost::filesystem::path::iterator'
    boost/filesystem/path.hpp(570) : see declaration of 'boost::filesystem::path::iterator'
    boost/iterator/iterator_facade.hpp(690) : see reference to function template instantiation 'void boost::iterator_core_access::advance<Derived>(Facade &,__w64 int)' being compiled
    with
    [
        Derived=boost::filesystem::path::iterator,
        Facade=boost::filesystem::path::iterator
    ]
    boost/iterator/iterator_facade.hpp(689) : while compiling class template member function 'boost::filesystem::path::iterator &boost::iterator_facade<Derived,Value,CategoryOrTraversal>::operator +=(__w64 int)'
    with
    [
        Derived=boost::filesystem::path::iterator,
        Value=const boost::filesystem::path,
        CategoryOrTraversal=boost::bidirectional_traversal_tag
    ]
    boost/filesystem/path.hpp(574) : see reference to class template instantiation 'boost::iterator_facade<Derived,Value,CategoryOrTraversal>' being compiled
    with
    [
        Derived=boost::filesystem::path::iterator,
        Value=const boost::filesystem::path,
        CategoryOrTraversal=boost::bidirectional_traversal_tag
    ]

Change History (0)

Note: See TracTickets for help on using tickets.