Boost logo

Boost Users :

Subject: [Boost-users] [spirit][iterator] position_iterator regression in 1.37.0
From: Rainer Deyke (rainerd_at_[hidden])
Date: 2008-11-04 13:22:50


When using this type:

   boost::spirit::position_iterator<std::string::const_iterator>

I get a static assertion failure:

..\..\lib\boost_1_37_0\boost/iterator/iterator_adaptor.hpp(230) : error
C2027: u
se of undefined type 'boost::STATIC_ASSERTION_FAILURE<x>'
         with
         [
             x=false
         ]
         ..\..\lib\boost_1_37_0\boost/iterator/iterator_adaptor.hpp(335)
: see re
ference to function template instantiation 'void
boost::detail::iterator_adaptor
_assert_traversal<boost::forward_traversal_tag,boost::random_access_traversal_ta
g>(void)' being compiled
         ..\..\lib\boost_1_37_0\boost/iterator/iterator_adaptor.hpp(334)
: while
compiling class template member function 'void
boost::iterator_adaptor<Derived,B
ase,Value,Traversal>::advance(__w64 int)'
         with
         [
 
Derived=boost::spirit::position_iterator<std::_String_const_iterator
<char,std::char_traits<char>,std::allocator<char>>>,
 
Base=std::_String_const_iterator<char,std::char_traits<char>,std::al
locator<char>>,
             Value=const char,
             Traversal=boost::forward_traversal_tag
         ]
 
..\..\lib\boost_1_37_0\boost/spirit/home/classic/iterator/position_itera
tor.hpp(156) : see reference to class template instantiation
'boost::iterator_ad
aptor<Derived,Base,Value,Traversal>' being compiled
         with
         [
 
Derived=boost::spirit::position_iterator<std::_String_const_iterator
<char,std::char_traits<char>,std::allocator<char>>>,
 
Base=std::_String_const_iterator<char,std::char_traits<char>,std::al
locator<char>>,
             Value=const char,
             Traversal=boost::forward_traversal_tag
         ]
         source/eldwood/core/lexer.cpp(81) : see reference to class
template inst
antiation 'boost::spirit::position_iterator<ForwardIteratorT>' being
compiled
         with
         [
 
ForwardIteratorT=std::_String_const_iterator<char,std::char_traits<c
har>,std::allocator<char>>
         ]

This is triggered on a simple function declaration taking a
position_iterator as argument, using MSVC8.0 Express on Windows XP. It
worked under Boost 1.36.0.

-- 
Rainer Deyke - rainerd_at_[hidden]

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net