]> git.lyx.org Git - lyx.git/blobdiff - boost/boost/token_iterator.hpp
thinko: if we have requires, do not test package
[lyx.git] / boost / boost / token_iterator.hpp
index 41d2cdea5c54e385198bc5207b3ad245e7f133c4..19b1db26c8625f6d386080f1e56c93d98e283ac5 100644 (file)
 #ifndef BOOST_TOKENIZER_POLICY_JRB070303_HPP_
 #define BOOST_TOKENIZER_POLICY_JRB070303_HPP_
 
+#include<boost/assert.hpp>
 #include<boost/iterator/iterator_adaptor.hpp>
 #include<boost/iterator/detail/minimum_category.hpp>
 #include<boost/token_functions.hpp>
 #include<utility>
-#include<cassert>
-
 
 namespace boost
 {
@@ -49,12 +48,12 @@ namespace boost
       Type tok_;
 
       void increment(){
-          assert(valid_);
+          BOOST_ASSERT(valid_);
           valid_ = f_(begin_,end_,tok_);
       }
 
       const Type&  dereference() const {
-          assert(valid_);
+          BOOST_ASSERT(valid_);
           return tok_;
       }
       template<class Other>
@@ -85,7 +84,7 @@ namespace boost
             token_iterator<TokenizerFunc, OtherIter,Type> const& t
             , typename enable_if_convertible<OtherIter, Iterator>::type* = 0)
             : f_(t.tokenizer_function()),begin_(t.base())
-            ,end_(t.end()),valid_(t.at_end()),tok_(t.current_token()) {}
+            ,end_(t.end()),valid_(!t.at_end()),tok_(t.current_token()) {}
 
       Iterator base()const{return begin_;}
 
@@ -95,7 +94,7 @@ namespace boost
 
       Type current_token()const{return tok_;}
 
-      bool at_end()const{return valid_;}
+      bool at_end()const{return !valid_;}