Boost logo

Boost :

From: Hartmut Kaiser (hartmutkaiser_at_[hidden])
Date: 2004-12-26 06:04:16


> template <
> typename CharT = char,
> typename BaseIterator =
> #ifndef BOOST_SPIRIT_FILEITERATOR_WINDOWS
> fileiter_impl::std_file_iterator<CharT>
> #else
> fileiter_impl::mmap_file_iterator<CharT>
> #endif
> > class file_iterator;
>
> BOOST_SPIRIT_FILEITERATOR_POSIX which is defined a few lines
> above is never used. Are there any issues with the posix-mmap
> code? It "worked" here, I modified the code to :
>
>
> template <
> typename CharT = char,
> typename BaseIterator =
> #if defined(BOOST_SPIRIT_FILEITERATOR_WINDOWS) ||
> defined(BOOST_SPIRIT_FILEITERATOR_POSIX)
> fileiter_impl::mmap_file_iterator<CharT>
> #else
> fileiter_impl::std_file_iterator<CharT>
> #endif
> > class file_iterator;

It is meant to be:

template <
    typename CharT = char,
    typename BaseIterator =
#if defined(BOOST_SPIRIT_FILEITERATOR_STD)
     fileiter_impl::std_file_iterator<CharT>
#else
     fileiter_impl::mmap_file_iterator<CharT>
#endif
> class file_iterator;

The ..._STD branch is either a forced selection or a fall back if neither
..._WINDOWS nor ..._POSIX is defined (the ..._STD get's defined at
file_iterator.hpp, line 41, whenever neither ..._WINDOWS nor ..._POSIX is
predefined).

I've fixed that in the CVS.

Regards Hartmut


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