12ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh//  (C) Copyright Gennadiy Rozental 2004-2008.
22ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh//  Distributed under the Boost Software License, Version 1.0.
32ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh//  (See accompanying file LICENSE_1_0.txt or copy at
42ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh//  http://www.boost.org/LICENSE_1_0.txt)
52ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
62ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh//  See http://www.boost.org/libs/test for the library home page.
72ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh//
82ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh//  File        : $RCSfile$
92ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh//
102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh//  Version     : $Revision: 54633 $
112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh//
122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh//  Description : token iterator for string and range tokenization
132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ***************************************************************************
142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#ifndef BOOST_TOKEN_ITERATOR_HPP_071894GER
162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#define BOOST_TOKEN_ITERATOR_HPP_071894GER
172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// Boost
192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/config.hpp>
202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/detail/workaround.hpp>
212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/iterator/iterator_categories.hpp>
232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/iterator/iterator_traits.hpp>
242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/test/utils/iterator/input_iterator_facade.hpp>
262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/test/utils/basic_cstring/basic_cstring.hpp>
272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/test/utils/named_params.hpp>
282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/test/utils/foreach.hpp>
292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// STL
312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <iosfwd>
322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <cctype>
332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/test/detail/suppress_warnings.hpp>
352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh//____________________________________________________________________________//
372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#ifdef BOOST_NO_STDC_NAMESPACE
392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehnamespace std{ using ::ispunct; using ::isspace; }
402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif
412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehnamespace boost {
432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehnamespace unit_test {
452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ************************************************************************** //
472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// **************               ti_delimeter_type              ************** //
482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ************************************************************************** //
492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehenum ti_delimeter_type {
512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    dt_char,        // character is delimeter if it among explicit list of some characters
522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    dt_ispunct,     // character is delimeter if it satisfies ispunct functor
532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    dt_isspace,     // character is delimeter if it satisfies isspace functor
542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    dt_none         // no character is delimeter
552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh};
562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehnamespace ut_detail {
582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ************************************************************************** //
602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// **************             default_char_compare             ************** //
612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ************************************************************************** //
622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<typename CharT>
642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehclass default_char_compare {
652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehpublic:
662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    bool operator()( CharT c1, CharT c2 )
672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    {
682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#ifdef BOOST_CLASSIC_IOSTREAMS
692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        return std::string_char_traits<CharT>::eq( c1, c2 );
702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#else
712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        return std::char_traits<CharT>::eq( c1, c2 );
722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif
732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    }
742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh};
752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ************************************************************************** //
772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// **************                 delim_policy                 ************** //
782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ************************************************************************** //
792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<typename CharT,typename CharCompare>
812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehclass delim_policy {
822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    typedef basic_cstring<CharT const> cstring;
832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehpublic:
842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    // Constructor
852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    explicit    delim_policy( ti_delimeter_type t = dt_char, cstring d = cstring() )
862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    : m_type( t )
872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    {
882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        set_delimeters( d );
892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    }
902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    void        set_delimeters( ti_delimeter_type t ) { m_type = t; }
922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    template<typename Src>
932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    void        set_delimeters( Src d )
942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    {
952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        nfp::optionally_assign( m_delimeters, d );
962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        if( !m_delimeters.is_empty() )
982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            m_type = dt_char;
992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    }
1002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
1012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    bool        operator()( CharT c )
1022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    {
1032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        switch( m_type ) {
1042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        case dt_char: {
1052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            BOOST_TEST_FOREACH( CharT, delim, m_delimeters )
1062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                if( CharCompare()( delim, c ) )
1072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                    return true;
1082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
1092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            return false;
1102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        }
1112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        case dt_ispunct:
1122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            return (std::ispunct)( c ) != 0;
1132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        case dt_isspace:
1142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            return (std::isspace)( c ) != 0;
1152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        case dt_none:
1162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            return false;
1172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        }
1182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
1192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        return false;
1202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    }
1212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
1222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehprivate:
1232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    // Data members
1242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    cstring             m_delimeters;
1252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    ti_delimeter_type   m_type;
1262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh};
1272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
1282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ************************************************************************** //
1292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// **************                 token_assigner               ************** //
1302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ************************************************************************** //
1312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
1322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<typename TraversalTag>
1332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehstruct token_assigner {
1342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#if BOOST_WORKAROUND( BOOST_DINKUMWARE_STDLIB, < 306 )
1352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    template<typename Iterator, typename C, typename T>
1362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    static void assign( Iterator b, Iterator e, std::basic_string<C,T>& t )
1372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    { for( ; b != e; ++b ) t += *b; }
1382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
1392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    template<typename Iterator, typename C>
1402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    static void assign( Iterator b, Iterator e, basic_cstring<C>& t )  { t.assign( b, e ); }
1412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#else
1422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    template<typename Iterator, typename Token>
1432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    static void assign( Iterator b, Iterator e, Token& t )  { t.assign( b, e ); }
1442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif
1452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    template<typename Iterator, typename Token>
1462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    static void append_move( Iterator& b, Token& )          { ++b; }
1472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh};
1482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
1492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh//____________________________________________________________________________//
1502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
1512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<>
1522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehstruct token_assigner<single_pass_traversal_tag> {
1532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    template<typename Iterator, typename Token>
1542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    static void assign( Iterator b, Iterator e, Token& t )  {}
1552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
1562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    template<typename Iterator, typename Token>
1572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    static void append_move( Iterator& b, Token& t )        { t += *b; ++b; }
1582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh};
1592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
1602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} // namespace ut_detail
1612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
1622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ************************************************************************** //
1632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// **************                  modifiers                   ************** //
1642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ************************************************************************** //
1652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
1662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehnamespace {
1672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehnfp::keyword<struct dropped_delimeters_t >           dropped_delimeters;
1682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehnfp::keyword<struct kept_delimeters_t >              kept_delimeters;
1692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehnfp::typed_keyword<bool,struct keep_empty_tokens_t > keep_empty_tokens;
1702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehnfp::typed_keyword<std::size_t,struct max_tokens_t > max_tokens;
1712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}
1722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
1732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ************************************************************************** //
1742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// **************             token_iterator_base              ************** //
1752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ************************************************************************** //
1762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
1772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<typename Derived,
1782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh         typename CharT,
1792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh         typename CharCompare   = ut_detail::default_char_compare<CharT>,
1802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh         typename ValueType     = basic_cstring<CharT const>,
1812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh         typename Reference     = basic_cstring<CharT const>,
1822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh         typename Traversal     = forward_traversal_tag>
1832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehclass token_iterator_base
1842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh: public input_iterator_facade<Derived,ValueType,Reference,Traversal> {
1852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    typedef basic_cstring<CharT const>                                      cstring;
1862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    typedef ut_detail::delim_policy<CharT,CharCompare>                      delim_policy;
1872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    typedef input_iterator_facade<Derived,ValueType,Reference,Traversal>    base;
1882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
1892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehprotected:
1902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    // Constructor
1912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    explicit    token_iterator_base()
1922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    : m_is_dropped( dt_isspace )
1932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    , m_is_kept( dt_ispunct )
1942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    , m_keep_empty_tokens( false )
1952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    , m_tokens_left( static_cast<std::size_t>(-1) )
1962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    , m_token_produced( false )
1972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    {
1982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    }
1992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    template<typename Modifier>
2012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    void
2022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    apply_modifier( Modifier const& m )
2032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    {
2042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        if( m.has( dropped_delimeters ) )
2052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            m_is_dropped.set_delimeters( m[dropped_delimeters] );
2062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        if( m.has( kept_delimeters ) )
2082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            m_is_kept.set_delimeters( m[kept_delimeters] );
2092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        if( m.has( keep_empty_tokens ) )
2112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            m_keep_empty_tokens = true;
2122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        nfp::optionally_assign( m_tokens_left, m, max_tokens );
2142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    }
2152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    template<typename Iter>
2172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    bool                    get( Iter& begin, Iter end )
2182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    {
2192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        typedef ut_detail::token_assigner<BOOST_DEDUCED_TYPENAME iterator_traversal<Iter>::type> Assigner;
2202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        Iter check_point;
2212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        this->m_value.clear();
2232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        if( !m_keep_empty_tokens ) {
2252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            while( begin != end && m_is_dropped( *begin ) )
2262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                ++begin;
2272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            if( begin == end )
2292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                return false;
2302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            check_point = begin;
2322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            if( m_tokens_left == 1 )
2342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                while( begin != end )
2352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                    Assigner::append_move( begin, this->m_value );
2362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            else if( m_is_kept( *begin ) )
2372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                Assigner::append_move( begin, this->m_value );
2382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            else
2392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                while( begin != end && !m_is_dropped( *begin ) && !m_is_kept( *begin ) )
2402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                    Assigner::append_move( begin, this->m_value );
2412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            --m_tokens_left;
2432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        }
2442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        else { // m_keep_empty_tokens is true
2452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            check_point = begin;
2462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            if( begin == end ) {
2482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                if( m_token_produced )
2492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                    return false;
2502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                m_token_produced = true;
2522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            }
2532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            if( m_is_kept( *begin ) ) {
2542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                if( m_token_produced )
2552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                    Assigner::append_move( begin, this->m_value );
2562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                m_token_produced = !m_token_produced;
2582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            }
2592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            else if( !m_token_produced && m_is_dropped( *begin ) )
2602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                m_token_produced = true;
2612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            else {
2622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                if( m_is_dropped( *begin ) )
2632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                    check_point = ++begin;
2642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                while( begin != end && !m_is_dropped( *begin ) && !m_is_kept( *begin ) )
2662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                    Assigner::append_move( begin, this->m_value );
2672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                m_token_produced = true;
2692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            }
2702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        }
2712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        Assigner::assign( check_point, begin, this->m_value );
2732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        return true;
2752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    }
2762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehprivate:
2782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    // Data members
2792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    delim_policy            m_is_dropped;
2802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    delim_policy            m_is_kept;
2812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    bool                    m_keep_empty_tokens;
2822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    std::size_t             m_tokens_left;
2832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    bool                    m_token_produced;
2842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh};
2852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ************************************************************************** //
2872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// **************          basic_string_token_iterator         ************** //
2882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ************************************************************************** //
2892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
2902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<typename CharT,
2912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh         typename CharCompare = ut_detail::default_char_compare<CharT> >
2922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehclass basic_string_token_iterator
2932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh: public token_iterator_base<basic_string_token_iterator<CharT,CharCompare>,CharT,CharCompare> {
2942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    typedef basic_cstring<CharT const> cstring;
2952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    typedef token_iterator_base<basic_string_token_iterator<CharT,CharCompare>,CharT,CharCompare> base;
2962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehpublic:
2972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    explicit    basic_string_token_iterator() {}
2982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    explicit    basic_string_token_iterator( cstring src )
2992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    : m_src( src )
3002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    {
3012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        this->init();
3022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    }
3032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
3042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    template<typename Src, typename Modifier>
3052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    basic_string_token_iterator( Src src, Modifier const& m )
3062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    : m_src( src )
3072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    {
3082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        this->apply_modifier( m );
3092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
3102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        this->init();
3112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    }
3122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
3132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehprivate:
3142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    friend class input_iterator_core_access;
3152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
3162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    // input iterator implementation
3172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    bool        get()
3182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    {
3192ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        typename cstring::iterator begin = m_src.begin();
3202ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        bool res = base::get( begin, m_src.end() );
3212ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
3222ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        m_src.assign( begin, m_src.end() );
3232ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
3242ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        return res;
3252ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    }
3262ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
3272ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    // Data members
3282ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    cstring     m_src;
3292ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh};
3302ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
3312ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtypedef basic_string_token_iterator<char>       string_token_iterator;
3322ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtypedef basic_string_token_iterator<wchar_t>    wstring_token_iterator;
3332ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
3342ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ************************************************************************** //
3352ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// **************              range_token_iterator            ************** //
3362ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ************************************************************************** //
3372ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
3382ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<typename Iter,
3392ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh         typename CharCompare = ut_detail::default_char_compare<BOOST_DEDUCED_TYPENAME iterator_value<Iter>::type>,
3402ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh         typename ValueType   = std::basic_string<BOOST_DEDUCED_TYPENAME iterator_value<Iter>::type>,
3412ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh         typename Reference   = ValueType const&>
3422ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehclass range_token_iterator
3432ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh: public token_iterator_base<range_token_iterator<Iter,CharCompare,ValueType,Reference>,
3442ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                             typename iterator_value<Iter>::type,CharCompare,ValueType,Reference> {
3452ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    typedef basic_cstring<typename ValueType::value_type> cstring;
3462ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    typedef token_iterator_base<range_token_iterator<Iter,CharCompare,ValueType,Reference>,
3472ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh                                typename iterator_value<Iter>::type,CharCompare,ValueType,Reference> base;
3482ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehpublic:
3492ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    explicit    range_token_iterator() {}
3502ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    explicit    range_token_iterator( Iter begin, Iter end = Iter() )
3512ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    : m_begin( begin ), m_end( end )
3522ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    {
3532ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        this->init();
3542ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    }
3552ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    range_token_iterator( range_token_iterator const& rhs )
3562ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    : base( rhs )
3572ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    {
3582ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        if( this->m_valid ) {
3592ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            m_begin = rhs.m_begin;
3602ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh            m_end   = rhs.m_end;
3612ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        }
3622ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    }
3632ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
3642ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    template<typename Modifier>
3652ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    range_token_iterator( Iter begin, Iter end, Modifier const& m )
3662ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    : m_begin( begin ), m_end( end )
3672ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    {
3682ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        this->apply_modifier( m );
3692ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
3702ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        this->init();
3712ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    }
3722ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
3732ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehprivate:
3742ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    friend class input_iterator_core_access;
3752ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
3762ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    // input iterator implementation
3772ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    bool        get()
3782ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    {
3792ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh        return base::get( m_begin, m_end );
3802ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    }
3812ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
3822ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    // Data members
3832ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    Iter m_begin;
3842ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    Iter m_end;
3852ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh};
3862ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
3872ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ************************************************************************** //
3882ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// **************            make_range_token_iterator         ************** //
3892ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh// ************************************************************************** //
3902ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
3912ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<typename Iter>
3922ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehinline range_token_iterator<Iter>
3932ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehmake_range_token_iterator( Iter begin, Iter end = Iter() )
3942ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{
3952ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    return range_token_iterator<Iter>( begin, end );
3962ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}
3972ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
3982ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh//____________________________________________________________________________//
3992ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
4002ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehtemplate<typename Iter,typename Modifier>
4012ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehinline range_token_iterator<Iter>
4022ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsiehmake_range_token_iterator( Iter begin, Iter end, Modifier const& m )
4032ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh{
4042ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh    return range_token_iterator<Iter>( begin, end, m );
4052ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh}
4062ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
4072ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh//____________________________________________________________________________//
4082ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
4092ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} // namespace unit_test
4102ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
4112ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh} // namespace boost
4122ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
4132ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh//____________________________________________________________________________//
4142ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
4152ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#include <boost/test/detail/enable_warnings.hpp>
4162ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
4172ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh#endif // BOOST_TOKEN_ITERATOR_HPP_071894GER
4182ca0e41376e99ad53c02fdb5333339ad3dcad19fAndrew Hsieh
419