Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2003-12-17 11:38:04


At 06:23 AM 12/17/2003, Bronek Kozicki wrote:

>I have two errors while building boost on MSVC71 (toolset vc7.1).
>Apparently boost::filesystem::directory_iterator should have member
>functions "decrement" and "advance", but these functions do not exist,
>at least on my platform.

It is more complicated than that. boost::filesystem::directory_iterator is
an input iterator. It is specified like this:

     class BOOST_FILESYSTEM_DECL directory_iterator
       : public boost::iterator_facade<
       directory_iterator,
       path,
       boost::single_pass_traversal_tag >

Perhaps I've got that wrong, but it has worked since the new-style
iterator_facade was introduced, and it still compiles fine and passes all
tests when built as a static library. See today's regression tests.

The problem arises only when it is built as a Windows DLL.

I could use some help on this. I don't understand why building as a DLL
causes boost::iterator_facade to instantiate differently. Is the
BOOST_FILESYSTEM_DECL the problem, and if so, what is the fix?

Thanks,

--Beman

>
>
>C:\WINGNU\msys\1.0\home\Bronislaw\boost\boost\boost\iterator\iterator_facade
>.hpp(294) : error C2039: 'decrement' : is not a member of
>'boost::filesystem::directory_iterator'
>
>C:\WINGNU\msys\1.0\home\Bronislaw\boost\boost\boost\filesystem\operations.hp
>p(80) : see declaration of 'boost::filesystem::directory_iterator'
>
>C:\WINGNU\msys\1.0\home\Bronislaw\boost\boost\boost\iterator\iterator_facade
>.hpp(414) : see reference to function template instantiation 'void
>boost::iterator_core_access::decrement<Derived>(Facade &)' being compiled
> with
> [
> Derived=boost::filesystem::directory_iterator,
> Facade=boost::filesystem::directory_iterator
> ]
>
>C:\WINGNU\msys\1.0\home\Bronislaw\boost\boost\boost\iterator\iterator_facade
>.hpp(413) : while compiling class-template member function
>'boost::filesystem::directory_iterator
>&boost::iterator_facade<Derived,Value,CategoryOrTraversal>::operator
>--(void)'
> with
> [
> Derived=boost::filesystem::directory_iterator,
> Value=boost::filesystem::path,
> CategoryOrTraversal=boost::single_pass_traversal_tag
> ]
>
>C:\WINGNU\msys\1.0\home\Bronislaw\boost\boost\boost\filesystem\operations.hp
>p(84) : see reference to class template instantiation
>'boost::iterator_facade<Derived,Value,CategoryOrTraversal>' being
compiled
> with
> [
> Derived=boost::filesystem::directory_iterator,
> Value=boost::filesystem::path,
> CategoryOrTraversal=boost::single_pass_traversal_tag
> ]
>
>C:\WINGNU\msys\1.0\home\Bronislaw\boost\boost\boost\iterator\iterator_facade
>.hpp(306) : error C2039: 'advance' : is not a member of
>'boost::filesystem::directory_iterator'
>
>C:\WINGNU\msys\1.0\home\Bronislaw\boost\boost\boost\filesystem\operations.hp
>p(80) : see declaration of 'boost::filesystem::directory_iterator'
>
>C:\WINGNU\msys\1.0\home\Bronislaw\boost\boost\boost\iterator\iterator_facade
>.hpp(427) : see reference to function template instantiation 'void
>boost::iterator_core_access::advance<Derived>(Facade
>&,boost::iterator_facade<Derived,Value,CategoryOrTraversal>::difference_type
>)' being compiled
> with
> [
> Derived=boost::filesystem::directory_iterator,
> Facade=boost::filesystem::directory_iterator,
> Value=boost::filesystem::path,
> CategoryOrTraversal=boost::single_pass_traversal_tag
> ]
>
>C:\WINGNU\msys\1.0\home\Bronislaw\boost\boost\boost\iterator\iterator_facade
>.hpp(426) : while compiling class-template member function
>'boost::filesystem::directory_iterator
>&boost::iterator_facade<Derived,Value,CategoryOrTraversal>::operator
>+=(boost::iterator_facade<Derived,Value,CategoryOrTraversal>::difference_typ
>e)'
> with
> [
> Derived=boost::filesystem::directory_iterator,
> Value=boost::filesystem::path,
> CategoryOrTraversal=boost::single_pass_traversal_tag
> ]
>
>Kind regards
>
>
>B.
>
>_______________________________________________
>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