/usr/include/boost/regex/v4
NameSizeModeActions
basic_regex.hpp240890644editdlrm
basic_regex_creator.hpp542060644editdlrm
basic_regex_parser.hpp1128510644editdlrm
char_regex_traits.hpp17260644editdlrm
cpp_regex_traits.hpp394250644editdlrm
cregex.hpp109870644editdlrm
c_regex_traits.hpp54970644editdlrm
error_type.hpp12580644editdlrm
fileiter.hpp143770644editdlrm
indexed_bit_flag.hpp13160644editdlrm
instances.hpp90800644editdlrm
iterator_category.hpp19600644editdlrm
iterator_traits.hpp38020644editdlrm
match_flags.hpp69340644editdlrm
match_results.hpp227730644editdlrm
mem_block_cache.hpp31320644editdlrm
perl_matcher.hpp188470644editdlrm
perl_matcher_common.hpp304760644editdlrm
perl_matcher_non_recursive.hpp632380644editdlrm
perl_matcher_recursive.hpp345400644editdlrm
primary_transform.hpp33470644editdlrm
protected_call.hpp16880644editdlrm
regbase.hpp59720644editdlrm
regex.hpp45900644editdlrm
regex_format.hpp342310644editdlrm
regex_fwd.hpp16460644editdlrm
regex_grep.hpp48790644editdlrm
regex_iterator.hpp64740644editdlrm
regex_match.hpp144750644editdlrm
regex_merge.hpp27650644editdlrm
regex_raw_buffer.hpp36860644editdlrm
regex_replace.hpp29250644editdlrm
regex_search.hpp70970644editdlrm
regex_split.hpp49560644editdlrm
regex_token_iterator.hpp126130644editdlrm
regex_traits.hpp49650644editdlrm
regex_traits_defaults.hpp115550644editdlrm
regex_workaround.hpp61710644editdlrm
states.hpp119150644editdlrm
sub_match.hpp231550644editdlrm
syntax_type.hpp43740644editdlrm
u32regex_iterator.hpp64750644editdlrm
u32regex_token_iterator.hpp150680644editdlrm
w32_regex_traits.hpp244550644editdlrm
Edit: /usr/include/boost/regex/v4/regex_iterator.hpp (6474B)
/* * * Copyright (c) 2003 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_iterator.hpp * VERSION see * DESCRIPTION: Provides regex_iterator implementation. */ #ifndef BOOST_REGEX_V4_REGEX_ITERATOR_HPP #define BOOST_REGEX_V4_REGEX_ITERATOR_HPP #include namespace boost{ #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif template class regex_iterator_implementation { typedef basic_regex regex_type; match_results what; // current match BidirectionalIterator base; // start of sequence BidirectionalIterator end; // end of sequence const regex_type re; // the expression match_flag_type flags; // flags for matching public: regex_iterator_implementation(const regex_type* p, BidirectionalIterator last, match_flag_type f) : base(), end(last), re(*p), flags(f){} regex_iterator_implementation(const regex_iterator_implementation& other) :what(other.what), base(other.base), end(other.end), re(other.re), flags(other.flags){} bool init(BidirectionalIterator first) { base = first; return regex_search(first, end, what, re, flags); } bool compare(const regex_iterator_implementation& that) { if(this == &that) return true; return (&re.get_data() == &that.re.get_data()) && (end == that.end) && (flags == that.flags) && (what[0].first == that.what[0].first) && (what[0].second == that.what[0].second); } const match_results& get() { return what; } bool next() { //if(what.prefix().first != what[0].second) // flags |= match_prev_avail; BidirectionalIterator next_start = what[0].second; match_flag_type f(flags); if(!what.length() || (f & regex_constants::match_posix)) f |= regex_constants::match_not_initial_null; //if(base != next_start) // f |= regex_constants::match_not_bob; bool result = regex_search(next_start, end, what, re, f, base); if(result) what.set_base(base); return result; } private: regex_iterator_implementation& operator=(const regex_iterator_implementation&); }; template ::value_type, class traits = regex_traits > class regex_iterator { private: typedef regex_iterator_implementation impl; typedef shared_ptr pimpl; public: typedef basic_regex regex_type; typedef match_results value_type; typedef typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits::difference_type difference_type; typedef const value_type* pointer; typedef const value_type& reference; typedef std::forward_iterator_tag iterator_category; regex_iterator(){} regex_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, match_flag_type m = match_default) : pdata(new impl(&re, b, m)) { if(!pdata->init(a)) { pdata.reset(); } } regex_iterator(const regex_iterator& that) : pdata(that.pdata) {} regex_iterator& operator=(const regex_iterator& that) { pdata = that.pdata; return *this; } bool operator==(const regex_iterator& that)const { if((pdata.get() == 0) || (that.pdata.get() == 0)) return pdata.get() == that.pdata.get(); return pdata->compare(*(that.pdata.get())); } bool operator!=(const regex_iterator& that)const { return !(*this == that); } const value_type& operator*()const { return pdata->get(); } const value_type* operator->()const { return &(pdata->get()); } regex_iterator& operator++() { cow(); if(0 == pdata->next()) { pdata.reset(); } return *this; } regex_iterator operator++(int) { regex_iterator result(*this); ++(*this); return result; } private: pimpl pdata; void cow() { // copy-on-write if(pdata.get() && !pdata.unique()) { pdata.reset(new impl(*(pdata.get()))); } } }; typedef regex_iterator cregex_iterator; typedef regex_iterator sregex_iterator; #ifndef BOOST_NO_WREGEX typedef regex_iterator wcregex_iterator; typedef regex_iterator wsregex_iterator; #endif // make_regex_iterator: template inline regex_iterator make_regex_iterator(const charT* p, const basic_regex& e, regex_constants::match_flag_type m = regex_constants::match_default) { return regex_iterator(p, p+traits::length(p), e, m); } template inline regex_iterator::const_iterator, charT, traits> make_regex_iterator(const std::basic_string& p, const basic_regex& e, regex_constants::match_flag_type m = regex_constants::match_default) { return regex_iterator::const_iterator, charT, traits>(p.begin(), p.end(), e, m); } #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } // namespace boost #endif // BOOST_REGEX_V4_REGEX_ITERATOR_HPP