Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:59:41

0001 /*
0002  *
0003  * Copyright (c) 2004
0004  * John Maddock
0005  *
0006  * Use, modification and distribution are subject to the 
0007  * Boost Software License, Version 1.0. (See accompanying file 
0008  * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0009  *
0010  */
0011  
0012  /*
0013   *   LOCATION:    see http://www.boost.org for most recent version.
0014   *   FILE         concepts.hpp
0015   *   VERSION      see <boost/version.hpp>
0016   *   DESCRIPTION: Declares regular expression concepts.
0017   */
0018 
0019 #ifndef BOOST_REGEX_CONCEPTS_HPP_INCLUDED
0020 #define BOOST_REGEX_CONCEPTS_HPP_INCLUDED
0021 
0022 #include <boost/concept_archetype.hpp>
0023 #include <boost/concept_check.hpp>
0024 #include <boost/type_traits/is_enum.hpp>
0025 #include <boost/type_traits/is_base_and_derived.hpp>
0026 #include <boost/static_assert.hpp>
0027 #ifndef BOOST_TEST_TR1_REGEX
0028 #include <boost/regex.hpp>
0029 #endif
0030 #include <bitset>
0031 #include <vector>
0032 #include <ostream>
0033 
0034 #ifdef BOOST_REGEX_CXX03
0035 #define RW_NS boost
0036 #else
0037 #define RW_NS std
0038 #endif
0039 
0040 namespace boost{
0041 
0042 //
0043 // bitmask_archetype:
0044 // this can be either an integer type, an enum, or a std::bitset,
0045 // we use the latter as the architype as it offers the "strictest"
0046 // of the possible interfaces:
0047 //
0048 typedef std::bitset<512> bitmask_archetype;
0049 //
0050 // char_architype:
0051 // A strict model for the character type interface.
0052 //
0053 struct char_architype
0054 {
0055    // default constructable:
0056    char_architype();
0057    // copy constructable / assignable:
0058    char_architype(const char_architype&);
0059    char_architype& operator=(const char_architype&);
0060    // constructable from an integral value:
0061    char_architype(unsigned long val);
0062    // comparable:
0063    bool operator==(const char_architype&)const;
0064    bool operator!=(const char_architype&)const;
0065    bool operator<(const char_architype&)const;
0066    bool operator<=(const char_architype&)const;
0067    bool operator>=(const char_architype&)const;
0068    bool operator>(const char_architype&)const;
0069    // conversion to integral type:
0070    operator long()const;
0071 };
0072 inline long hash_value(char_architype val)
0073 {  return val;  }
0074 //
0075 // char_architype can not be used with basic_string:
0076 //
0077 } // namespace boost
0078 namespace std{
0079    template<> struct char_traits<boost::char_architype>
0080    {
0081       // The intent is that this template is not instantiated,
0082       // but this typedef gives us a chance of compilation in
0083       // case it is:
0084       typedef boost::char_architype char_type;
0085    };
0086 }
0087 //
0088 // Allocator architype:
0089 //
0090 template <class T>
0091 class allocator_architype
0092 {
0093 public:
0094    typedef T* pointer;
0095    typedef const T* const_pointer;
0096    typedef T& reference;
0097    typedef const T& const_reference;
0098    typedef T value_type;
0099    typedef unsigned size_type;
0100    typedef int difference_type;
0101 
0102    template <class U>
0103    struct rebind
0104    {
0105       typedef allocator_architype<U> other;
0106    };
0107 
0108    pointer address(reference r){ return &r; }
0109    const_pointer address(const_reference r) { return &r; }
0110    pointer allocate(size_type n) { return static_cast<pointer>(std::malloc(n)); }
0111    pointer allocate(size_type n, pointer) { return static_cast<pointer>(std::malloc(n)); }
0112    void deallocate(pointer p, size_type) { std::free(p); }
0113    size_type max_size()const { return UINT_MAX; }
0114 
0115    allocator_architype(){}
0116    allocator_architype(const allocator_architype&){}
0117 
0118    template <class Other>
0119    allocator_architype(const allocator_architype<Other>&){}
0120 
0121    void construct(pointer p, const_reference r) { new (p)T(r); }
0122    void destroy(pointer p) { p->~T(); }
0123 };
0124 
0125 template <class T>
0126 bool operator == (const allocator_architype<T>&, const allocator_architype<T>&) {return true; }
0127 template <class T>
0128 bool operator != (const allocator_architype<T>&, const allocator_architype<T>&) { return false; }
0129 
0130 namespace boost{
0131 //
0132 // regex_traits_architype:
0133 // A strict interpretation of the regular expression traits class requirements.
0134 //
0135 template <class charT>
0136 struct regex_traits_architype
0137 {
0138 public:
0139    regex_traits_architype(){}
0140    typedef charT char_type;
0141    // typedef std::size_t size_type;
0142    typedef std::vector<char_type> string_type;
0143    typedef copy_constructible_archetype<assignable_archetype<> > locale_type;
0144    typedef bitmask_archetype char_class_type;
0145 
0146    static std::size_t length(const char_type* ) { return 0; }
0147 
0148    charT translate(charT ) const { return charT(); }
0149    charT translate_nocase(charT ) const { return static_object<charT>::get(); }
0150 
0151    template <class ForwardIterator>
0152    string_type transform(ForwardIterator , ForwardIterator ) const
0153    { return static_object<string_type>::get(); }
0154    template <class ForwardIterator>
0155    string_type transform_primary(ForwardIterator , ForwardIterator ) const
0156    { return static_object<string_type>::get(); }
0157 
0158    template <class ForwardIterator>
0159    char_class_type lookup_classname(ForwardIterator , ForwardIterator ) const
0160    { return static_object<char_class_type>::get(); }
0161    template <class ForwardIterator>
0162    string_type lookup_collatename(ForwardIterator , ForwardIterator ) const
0163    { return static_object<string_type>::get(); }
0164 
0165    bool isctype(charT, char_class_type) const
0166    { return false; }
0167    int value(charT, int) const
0168    { return 0; }
0169 
0170    locale_type imbue(locale_type l)
0171    { return l; }
0172    locale_type getloc()const
0173    { return static_object<locale_type>::get(); }
0174 
0175 private:
0176    // this type is not copyable:
0177    regex_traits_architype(const regex_traits_architype&){}
0178    regex_traits_architype& operator=(const regex_traits_architype&){ return *this; }
0179 };
0180 
0181 //
0182 // alter this to std::tr1, to test a std implementation:
0183 //
0184 #ifndef BOOST_TEST_TR1_REGEX
0185 namespace global_regex_namespace = ::boost;
0186 #else
0187 namespace global_regex_namespace = ::std::tr1;
0188 #endif
0189 
0190 template <class Bitmask>
0191 struct BitmaskConcept
0192 {
0193    void constraints() 
0194    {
0195       function_requires<CopyConstructibleConcept<Bitmask> >();
0196       function_requires<AssignableConcept<Bitmask> >();
0197 
0198       m_mask1 = m_mask2 | m_mask3;
0199       m_mask1 = m_mask2 & m_mask3;
0200       m_mask1 = m_mask2 ^ m_mask3;
0201 
0202       m_mask1 = ~m_mask2;
0203 
0204       m_mask1 |= m_mask2;
0205       m_mask1 &= m_mask2;
0206       m_mask1 ^= m_mask2;
0207    }
0208    Bitmask m_mask1, m_mask2, m_mask3;
0209 };
0210 
0211 template <class traits>
0212 struct RegexTraitsConcept
0213 {
0214    RegexTraitsConcept();
0215    // required typedefs:
0216    typedef typename traits::char_type char_type;
0217    // typedef typename traits::size_type size_type;
0218    typedef typename traits::string_type string_type;
0219    typedef typename traits::locale_type locale_type;
0220    typedef typename traits::char_class_type char_class_type;
0221 
0222    void constraints() 
0223    {
0224       //function_requires<UnsignedIntegerConcept<size_type> >();
0225       function_requires<RandomAccessContainerConcept<string_type> >();
0226       function_requires<DefaultConstructibleConcept<locale_type> >();
0227       function_requires<CopyConstructibleConcept<locale_type> >();
0228       function_requires<AssignableConcept<locale_type> >();
0229       function_requires<BitmaskConcept<char_class_type> >();
0230 
0231       std::size_t n = traits::length(m_pointer);
0232       ignore_unused_variable_warning(n);
0233 
0234       char_type c = m_ctraits.translate(m_char);
0235       ignore_unused_variable_warning(c);
0236       c = m_ctraits.translate_nocase(m_char);
0237       
0238       //string_type::foobar bar;
0239       string_type s1 = m_ctraits.transform(m_pointer, m_pointer);
0240       ignore_unused_variable_warning(s1);
0241 
0242       string_type s2 = m_ctraits.transform_primary(m_pointer, m_pointer);
0243       ignore_unused_variable_warning(s2);
0244 
0245       char_class_type cc = m_ctraits.lookup_classname(m_pointer, m_pointer);
0246       ignore_unused_variable_warning(cc);
0247 
0248       string_type s3 = m_ctraits.lookup_collatename(m_pointer, m_pointer);
0249       ignore_unused_variable_warning(s3);
0250 
0251       bool b = m_ctraits.isctype(m_char, cc);
0252       ignore_unused_variable_warning(b);
0253 
0254       int v = m_ctraits.value(m_char, 16);
0255       ignore_unused_variable_warning(v);
0256 
0257       locale_type l(m_ctraits.getloc());
0258       m_traits.imbue(l);
0259       ignore_unused_variable_warning(l);
0260    }
0261    traits m_traits;
0262    const traits m_ctraits;
0263    const char_type* m_pointer;
0264    char_type m_char;
0265 private:
0266    RegexTraitsConcept& operator=(RegexTraitsConcept&);
0267 };
0268 
0269 //
0270 // helper class to compute what traits class a regular expression type is using:
0271 //
0272 template <class Regex>
0273 struct regex_traits_computer;
0274 
0275 template <class charT, class traits>
0276 struct regex_traits_computer< global_regex_namespace::basic_regex<charT, traits> >
0277 {
0278    typedef traits type;
0279 };
0280 
0281 //
0282 // BaseRegexConcept does not test anything dependent on basic_string,
0283 // in case our charT does not have an associated char_traits:
0284 //
0285 template <class Regex>
0286 struct BaseRegexConcept
0287 {
0288    typedef typename Regex::value_type value_type;
0289    //typedef typename Regex::size_type size_type;
0290    typedef typename Regex::flag_type flag_type;
0291    typedef typename Regex::locale_type locale_type;
0292    typedef input_iterator_archetype<value_type> input_iterator_type;
0293 
0294    // derived test types:
0295    typedef const value_type* pointer_type;
0296    typedef bidirectional_iterator_archetype<value_type> BidiIterator;
0297    typedef global_regex_namespace::sub_match<BidiIterator> sub_match_type;
0298    typedef global_regex_namespace::match_results<BidiIterator, allocator_architype<sub_match_type> > match_results_type;
0299    typedef global_regex_namespace::match_results<BidiIterator> match_results_default_type;
0300    typedef output_iterator_archetype<value_type> OutIterator;
0301    typedef typename regex_traits_computer<Regex>::type traits_type;
0302    typedef global_regex_namespace::regex_iterator<BidiIterator, value_type, traits_type> regex_iterator_type;
0303    typedef global_regex_namespace::regex_token_iterator<BidiIterator, value_type, traits_type> regex_token_iterator_type;
0304 
0305    void global_constraints()
0306    {
0307       //
0308       // test non-template components:
0309       //
0310       function_requires<BitmaskConcept<global_regex_namespace::regex_constants::syntax_option_type> >();
0311       global_regex_namespace::regex_constants::syntax_option_type opts
0312          = global_regex_namespace::regex_constants::icase
0313          | global_regex_namespace::regex_constants::nosubs
0314          | global_regex_namespace::regex_constants::optimize
0315          | global_regex_namespace::regex_constants::collate
0316          | global_regex_namespace::regex_constants::ECMAScript
0317          | global_regex_namespace::regex_constants::basic
0318          | global_regex_namespace::regex_constants::extended
0319          | global_regex_namespace::regex_constants::awk
0320          | global_regex_namespace::regex_constants::grep
0321          | global_regex_namespace::regex_constants::egrep;
0322       ignore_unused_variable_warning(opts);
0323 
0324       function_requires<BitmaskConcept<global_regex_namespace::regex_constants::match_flag_type> >();
0325       global_regex_namespace::regex_constants::match_flag_type mopts
0326          = global_regex_namespace::regex_constants::match_default
0327          | global_regex_namespace::regex_constants::match_not_bol
0328          | global_regex_namespace::regex_constants::match_not_eol
0329          | global_regex_namespace::regex_constants::match_not_bow
0330          | global_regex_namespace::regex_constants::match_not_eow
0331          | global_regex_namespace::regex_constants::match_any
0332          | global_regex_namespace::regex_constants::match_not_null
0333          | global_regex_namespace::regex_constants::match_continuous
0334          | global_regex_namespace::regex_constants::match_prev_avail
0335          | global_regex_namespace::regex_constants::format_default
0336          | global_regex_namespace::regex_constants::format_sed
0337          | global_regex_namespace::regex_constants::format_no_copy
0338          | global_regex_namespace::regex_constants::format_first_only;
0339       ignore_unused_variable_warning(mopts);
0340 
0341       BOOST_STATIC_ASSERT((::boost::is_enum<global_regex_namespace::regex_constants::error_type>::value));
0342       global_regex_namespace::regex_constants::error_type e1 = global_regex_namespace::regex_constants::error_collate;
0343       ignore_unused_variable_warning(e1);
0344       e1 = global_regex_namespace::regex_constants::error_ctype;
0345       ignore_unused_variable_warning(e1);
0346       e1 = global_regex_namespace::regex_constants::error_escape;
0347       ignore_unused_variable_warning(e1);
0348       e1 = global_regex_namespace::regex_constants::error_backref;
0349       ignore_unused_variable_warning(e1);
0350       e1 = global_regex_namespace::regex_constants::error_brack;
0351       ignore_unused_variable_warning(e1);
0352       e1 = global_regex_namespace::regex_constants::error_paren;
0353       ignore_unused_variable_warning(e1);
0354       e1 = global_regex_namespace::regex_constants::error_brace;
0355       ignore_unused_variable_warning(e1);
0356       e1 = global_regex_namespace::regex_constants::error_badbrace;
0357       ignore_unused_variable_warning(e1);
0358       e1 = global_regex_namespace::regex_constants::error_range;
0359       ignore_unused_variable_warning(e1);
0360       e1 = global_regex_namespace::regex_constants::error_space;
0361       ignore_unused_variable_warning(e1);
0362       e1 = global_regex_namespace::regex_constants::error_badrepeat;
0363       ignore_unused_variable_warning(e1);
0364       e1 = global_regex_namespace::regex_constants::error_complexity;
0365       ignore_unused_variable_warning(e1);
0366       e1 = global_regex_namespace::regex_constants::error_stack;
0367       ignore_unused_variable_warning(e1);
0368 
0369       BOOST_STATIC_ASSERT((::boost::is_base_and_derived<std::runtime_error, global_regex_namespace::regex_error>::value  ));
0370       const global_regex_namespace::regex_error except(e1);
0371       e1 = except.code();
0372 
0373       typedef typename Regex::value_type regex_value_type;
0374       function_requires< RegexTraitsConcept<global_regex_namespace::regex_traits<char> > >();
0375       function_requires< BaseRegexConcept<global_regex_namespace::basic_regex<char> > >();
0376    }
0377    void constraints() 
0378    {
0379       global_constraints();
0380 
0381       BOOST_STATIC_ASSERT((::boost::is_same< flag_type, global_regex_namespace::regex_constants::syntax_option_type>::value));
0382       flag_type opts
0383          = Regex::icase
0384          | Regex::nosubs
0385          | Regex::optimize
0386          | Regex::collate
0387          | Regex::ECMAScript
0388          | Regex::basic
0389          | Regex::extended
0390          | Regex::awk
0391          | Regex::grep
0392          | Regex::egrep;
0393       ignore_unused_variable_warning(opts);
0394 
0395       function_requires<DefaultConstructibleConcept<Regex> >();
0396       function_requires<CopyConstructibleConcept<Regex> >();
0397 
0398       // Regex constructors:
0399       Regex e1(m_pointer);
0400       ignore_unused_variable_warning(e1);
0401       Regex e2(m_pointer, m_flags);
0402       ignore_unused_variable_warning(e2);
0403       Regex e3(m_pointer, m_size, m_flags);
0404       ignore_unused_variable_warning(e3);
0405       Regex e4(in1, in2);
0406       ignore_unused_variable_warning(e4);
0407       Regex e5(in1, in2, m_flags);
0408       ignore_unused_variable_warning(e5);
0409 
0410       // assign etc:
0411       Regex e;
0412       e = m_pointer;
0413       e = e1;
0414       e.assign(e1);
0415       e.assign(m_pointer);
0416       e.assign(m_pointer, m_flags);
0417       e.assign(m_pointer, m_size, m_flags);
0418       e.assign(in1, in2);
0419       e.assign(in1, in2, m_flags);
0420 
0421       // access:
0422       const Regex ce;
0423       typename Regex::size_type i = ce.mark_count();
0424       ignore_unused_variable_warning(i);
0425       m_flags = ce.flags();
0426       e.imbue(ce.getloc());
0427       e.swap(e1);
0428       
0429       global_regex_namespace::swap(e, e1);
0430 
0431       // sub_match:
0432       BOOST_STATIC_ASSERT((::boost::is_base_and_derived<std::pair<BidiIterator, BidiIterator>, sub_match_type>::value));
0433       typedef typename sub_match_type::value_type sub_value_type;
0434       typedef typename sub_match_type::difference_type sub_diff_type;
0435       typedef typename sub_match_type::iterator sub_iter_type;
0436       BOOST_STATIC_ASSERT((::boost::is_same<sub_value_type, value_type>::value));
0437       BOOST_STATIC_ASSERT((::boost::is_same<sub_iter_type, BidiIterator>::value));
0438       bool b = m_sub.matched;
0439       ignore_unused_variable_warning(b);
0440       BidiIterator bi = m_sub.first;
0441       ignore_unused_variable_warning(bi);
0442       bi = m_sub.second;
0443       ignore_unused_variable_warning(bi);
0444       sub_diff_type diff = m_sub.length();
0445       ignore_unused_variable_warning(diff);
0446       // match_results tests - some typedefs are not used, however these
0447       // guarante that they exist (some compilers may warn on non-usage)
0448       typedef typename match_results_type::value_type mr_value_type;
0449       typedef typename match_results_type::const_reference mr_const_reference;
0450       typedef typename match_results_type::reference mr_reference;
0451       typedef typename match_results_type::const_iterator mr_const_iterator;
0452       typedef typename match_results_type::iterator mr_iterator;
0453       typedef typename match_results_type::difference_type mr_difference_type;
0454       typedef typename match_results_type::size_type mr_size_type;
0455       typedef typename match_results_type::allocator_type mr_allocator_type;
0456       typedef typename match_results_type::char_type mr_char_type;
0457       typedef typename match_results_type::string_type mr_string_type;
0458 
0459       match_results_type m1;
0460       mr_allocator_type at;
0461       match_results_type m2(at);
0462       match_results_type m3(m1);
0463       m1 = m2;
0464 
0465       int ival = 0;
0466 
0467       mr_size_type mrs = m_cresults.size();
0468       ignore_unused_variable_warning(mrs);
0469       mrs = m_cresults.max_size();
0470       ignore_unused_variable_warning(mrs);
0471       b = m_cresults.empty();
0472       ignore_unused_variable_warning(b);
0473       mr_difference_type mrd = m_cresults.length();
0474       ignore_unused_variable_warning(mrd);
0475       mrd = m_cresults.length(ival);
0476       ignore_unused_variable_warning(mrd);
0477       mrd = m_cresults.position();
0478       ignore_unused_variable_warning(mrd);
0479       mrd = m_cresults.position(mrs);
0480       ignore_unused_variable_warning(mrd);
0481 
0482       mr_const_reference mrcr = m_cresults[ival];
0483       ignore_unused_variable_warning(mrcr);
0484       mr_const_reference mrcr2 = m_cresults.prefix();
0485       ignore_unused_variable_warning(mrcr2);
0486       mr_const_reference mrcr3 = m_cresults.suffix();
0487       ignore_unused_variable_warning(mrcr3);
0488       mr_const_iterator mrci = m_cresults.begin();
0489       ignore_unused_variable_warning(mrci);
0490       mrci = m_cresults.end();
0491       ignore_unused_variable_warning(mrci);
0492 
0493       (void) m_cresults.get_allocator();
0494       m_results.swap(m_results);
0495       global_regex_namespace::swap(m_results, m_results);
0496 
0497       // regex_match:
0498       b = global_regex_namespace::regex_match(m_in, m_in, m_results, e);
0499       ignore_unused_variable_warning(b);
0500       b = global_regex_namespace::regex_match(m_in, m_in, m_results, e, m_mft);
0501       ignore_unused_variable_warning(b);
0502       b = global_regex_namespace::regex_match(m_in, m_in, e);
0503       ignore_unused_variable_warning(b);
0504       b = global_regex_namespace::regex_match(m_in, m_in, e, m_mft);
0505       ignore_unused_variable_warning(b);
0506       b = global_regex_namespace::regex_match(m_pointer, m_pmatch, e);
0507       ignore_unused_variable_warning(b);
0508       b = global_regex_namespace::regex_match(m_pointer, m_pmatch, e, m_mft);
0509       ignore_unused_variable_warning(b);
0510       b = global_regex_namespace::regex_match(m_pointer, e);
0511       ignore_unused_variable_warning(b);
0512       b = global_regex_namespace::regex_match(m_pointer, e, m_mft);
0513       ignore_unused_variable_warning(b);
0514       // regex_search:
0515       b = global_regex_namespace::regex_search(m_in, m_in, m_results, e);
0516       ignore_unused_variable_warning(b);
0517       b = global_regex_namespace::regex_search(m_in, m_in, m_results, e, m_mft);
0518       ignore_unused_variable_warning(b);
0519       b = global_regex_namespace::regex_search(m_in, m_in, e);
0520       ignore_unused_variable_warning(b);
0521       b = global_regex_namespace::regex_search(m_in, m_in, e, m_mft);
0522       ignore_unused_variable_warning(b);
0523       b = global_regex_namespace::regex_search(m_pointer, m_pmatch, e);
0524       ignore_unused_variable_warning(b);
0525       b = global_regex_namespace::regex_search(m_pointer, m_pmatch, e, m_mft);
0526       ignore_unused_variable_warning(b);
0527       b = global_regex_namespace::regex_search(m_pointer, e);
0528       ignore_unused_variable_warning(b);
0529       b = global_regex_namespace::regex_search(m_pointer, e, m_mft);
0530       ignore_unused_variable_warning(b);
0531 
0532       // regex_iterator:
0533       typedef typename regex_iterator_type::regex_type rit_regex_type;
0534       typedef typename regex_iterator_type::value_type rit_value_type;
0535       typedef typename regex_iterator_type::difference_type rit_difference_type;
0536       typedef typename regex_iterator_type::pointer rit_pointer;
0537       typedef typename regex_iterator_type::reference rit_reference;
0538       typedef typename regex_iterator_type::iterator_category rit_iterator_category;
0539       BOOST_STATIC_ASSERT((::boost::is_same<rit_regex_type, Regex>::value));
0540       BOOST_STATIC_ASSERT((::boost::is_same<rit_value_type, match_results_default_type>::value));
0541       BOOST_STATIC_ASSERT((::boost::is_same<rit_difference_type, std::ptrdiff_t>::value));
0542       BOOST_STATIC_ASSERT((::boost::is_same<rit_pointer, const match_results_default_type*>::value));
0543       BOOST_STATIC_ASSERT((::boost::is_same<rit_reference, const match_results_default_type&>::value));
0544       BOOST_STATIC_ASSERT((::boost::is_convertible<rit_iterator_category*, std::forward_iterator_tag*>::value));
0545       // this takes care of most of the checks needed:
0546       function_requires<ForwardIteratorConcept<regex_iterator_type> >();
0547       regex_iterator_type iter1(m_in, m_in, e);
0548       ignore_unused_variable_warning(iter1);
0549       regex_iterator_type iter2(m_in, m_in, e, m_mft);
0550       ignore_unused_variable_warning(iter2);
0551 
0552       // regex_token_iterator:
0553       typedef typename regex_token_iterator_type::regex_type rtit_regex_type;
0554       typedef typename regex_token_iterator_type::value_type rtit_value_type;
0555       typedef typename regex_token_iterator_type::difference_type rtit_difference_type;
0556       typedef typename regex_token_iterator_type::pointer rtit_pointer;
0557       typedef typename regex_token_iterator_type::reference rtit_reference;
0558       typedef typename regex_token_iterator_type::iterator_category rtit_iterator_category;
0559       BOOST_STATIC_ASSERT((::boost::is_same<rtit_regex_type, Regex>::value));
0560       BOOST_STATIC_ASSERT((::boost::is_same<rtit_value_type, sub_match_type>::value));
0561       BOOST_STATIC_ASSERT((::boost::is_same<rtit_difference_type, std::ptrdiff_t>::value));
0562       BOOST_STATIC_ASSERT((::boost::is_same<rtit_pointer, const sub_match_type*>::value));
0563       BOOST_STATIC_ASSERT((::boost::is_same<rtit_reference, const sub_match_type&>::value));
0564       BOOST_STATIC_ASSERT((::boost::is_convertible<rtit_iterator_category*, std::forward_iterator_tag*>::value));
0565       // this takes care of most of the checks needed:
0566       function_requires<ForwardIteratorConcept<regex_token_iterator_type> >();
0567       regex_token_iterator_type ti1(m_in, m_in, e);
0568       ignore_unused_variable_warning(ti1);
0569       regex_token_iterator_type ti2(m_in, m_in, e, 0);
0570       ignore_unused_variable_warning(ti2);
0571       regex_token_iterator_type ti3(m_in, m_in, e, 0, m_mft);
0572       ignore_unused_variable_warning(ti3);
0573       std::vector<int> subs;
0574       regex_token_iterator_type ti4(m_in, m_in, e, subs);
0575       ignore_unused_variable_warning(ti4);
0576       regex_token_iterator_type ti5(m_in, m_in, e, subs, m_mft);
0577       ignore_unused_variable_warning(ti5);
0578       static const int i_array[3] = { 1, 2, 3, };
0579       regex_token_iterator_type ti6(m_in, m_in, e, i_array);
0580       ignore_unused_variable_warning(ti6);
0581       regex_token_iterator_type ti7(m_in, m_in, e, i_array, m_mft);
0582       ignore_unused_variable_warning(ti7);
0583    }
0584 
0585    pointer_type m_pointer;
0586    flag_type m_flags;
0587    std::size_t m_size;
0588    input_iterator_type in1, in2;
0589    const sub_match_type m_sub;
0590    const value_type m_char;
0591    match_results_type m_results;
0592    const match_results_type m_cresults;
0593    OutIterator m_out;
0594    BidiIterator m_in;
0595    global_regex_namespace::regex_constants::match_flag_type m_mft;
0596    global_regex_namespace::match_results<
0597       pointer_type, 
0598       allocator_architype<global_regex_namespace::sub_match<pointer_type> > > 
0599       m_pmatch;
0600 
0601    BaseRegexConcept();
0602    BaseRegexConcept(const BaseRegexConcept&);
0603    BaseRegexConcept& operator=(const BaseRegexConcept&);
0604 };
0605 
0606 //
0607 // RegexConcept:
0608 // Test every interface in the std:
0609 //
0610 template <class Regex>
0611 struct RegexConcept
0612 {
0613    typedef typename Regex::value_type value_type;
0614    //typedef typename Regex::size_type size_type;
0615    typedef typename Regex::flag_type flag_type;
0616    typedef typename Regex::locale_type locale_type;
0617 
0618    // derived test types:
0619    typedef const value_type* pointer_type;
0620    typedef std::basic_string<value_type> string_type;
0621    typedef boost::bidirectional_iterator_archetype<value_type> BidiIterator;
0622    typedef global_regex_namespace::sub_match<BidiIterator> sub_match_type;
0623    typedef global_regex_namespace::match_results<BidiIterator, allocator_architype<sub_match_type> > match_results_type;
0624    typedef output_iterator_archetype<value_type> OutIterator;
0625 
0626 
0627    void constraints() 
0628    {
0629       function_requires<BaseRegexConcept<Regex> >();
0630       // string based construct:
0631       Regex e1(m_string);
0632       ignore_unused_variable_warning(e1);
0633       Regex e2(m_string, m_flags);
0634       ignore_unused_variable_warning(e2);
0635 
0636       // assign etc:
0637       Regex e;
0638       e = m_string;
0639       e.assign(m_string);
0640       e.assign(m_string, m_flags);
0641 
0642       // sub_match:
0643       string_type s(m_sub);
0644       ignore_unused_variable_warning(s);
0645       s = m_sub.str();
0646       ignore_unused_variable_warning(s);
0647       int i = m_sub.compare(m_string);
0648       ignore_unused_variable_warning(i);
0649 
0650       int i2 = m_sub.compare(m_sub);
0651       ignore_unused_variable_warning(i2);
0652       i2 = m_sub.compare(m_pointer);
0653       ignore_unused_variable_warning(i2);
0654 
0655       bool b = m_sub == m_sub;
0656       ignore_unused_variable_warning(b);
0657       b = m_sub != m_sub;
0658       ignore_unused_variable_warning(b);
0659       b = m_sub <= m_sub;
0660       ignore_unused_variable_warning(b);
0661       b = m_sub <= m_sub;
0662       ignore_unused_variable_warning(b);
0663       b = m_sub > m_sub;
0664       ignore_unused_variable_warning(b);
0665       b = m_sub >= m_sub;
0666       ignore_unused_variable_warning(b);
0667 
0668       b = m_sub == m_pointer;
0669       ignore_unused_variable_warning(b);
0670       b = m_sub != m_pointer;
0671       ignore_unused_variable_warning(b);
0672       b = m_sub <= m_pointer;
0673       ignore_unused_variable_warning(b);
0674       b = m_sub <= m_pointer;
0675       ignore_unused_variable_warning(b);
0676       b = m_sub > m_pointer;
0677       ignore_unused_variable_warning(b);
0678       b = m_sub >= m_pointer;
0679       ignore_unused_variable_warning(b);
0680 
0681       b = m_pointer == m_sub;
0682       ignore_unused_variable_warning(b);
0683       b = m_pointer != m_sub;
0684       ignore_unused_variable_warning(b);
0685       b = m_pointer <= m_sub;
0686       ignore_unused_variable_warning(b);
0687       b = m_pointer <= m_sub;
0688       ignore_unused_variable_warning(b);
0689       b = m_pointer > m_sub;
0690       ignore_unused_variable_warning(b);
0691       b = m_pointer >= m_sub;
0692       ignore_unused_variable_warning(b);
0693 
0694       b = m_sub == m_char;
0695       ignore_unused_variable_warning(b);
0696       b = m_sub != m_char;
0697       ignore_unused_variable_warning(b);
0698       b = m_sub <= m_char;
0699       ignore_unused_variable_warning(b);
0700       b = m_sub <= m_char;
0701       ignore_unused_variable_warning(b);
0702       b = m_sub > m_char;
0703       ignore_unused_variable_warning(b);
0704       b = m_sub >= m_char;
0705       ignore_unused_variable_warning(b);
0706 
0707       b = m_char == m_sub;
0708       ignore_unused_variable_warning(b);
0709       b = m_char != m_sub;
0710       ignore_unused_variable_warning(b);
0711       b = m_char <= m_sub;
0712       ignore_unused_variable_warning(b);
0713       b = m_char <= m_sub;
0714       ignore_unused_variable_warning(b);
0715       b = m_char > m_sub;
0716       ignore_unused_variable_warning(b);
0717       b = m_char >= m_sub;
0718       ignore_unused_variable_warning(b);
0719 
0720       b = m_sub == m_string;
0721       ignore_unused_variable_warning(b);
0722       b = m_sub != m_string;
0723       ignore_unused_variable_warning(b);
0724       b = m_sub <= m_string;
0725       ignore_unused_variable_warning(b);
0726       b = m_sub <= m_string;
0727       ignore_unused_variable_warning(b);
0728       b = m_sub > m_string;
0729       ignore_unused_variable_warning(b);
0730       b = m_sub >= m_string;
0731       ignore_unused_variable_warning(b);
0732 
0733       b = m_string == m_sub;
0734       ignore_unused_variable_warning(b);
0735       b = m_string != m_sub;
0736       ignore_unused_variable_warning(b);
0737       b = m_string <= m_sub;
0738       ignore_unused_variable_warning(b);
0739       b = m_string <= m_sub;
0740       ignore_unused_variable_warning(b);
0741       b = m_string > m_sub;
0742       ignore_unused_variable_warning(b);
0743       b = m_string >= m_sub;
0744       ignore_unused_variable_warning(b);
0745 
0746       // match results:
0747       m_string = m_results.str();
0748       ignore_unused_variable_warning(m_string);
0749       m_string = m_results.str(0);
0750       ignore_unused_variable_warning(m_string);
0751       m_out = m_cresults.format(m_out, m_string);
0752       m_out = m_cresults.format(m_out, m_string, m_mft);
0753       m_string = m_cresults.format(m_string);
0754       ignore_unused_variable_warning(m_string);
0755       m_string = m_cresults.format(m_string, m_mft);
0756       ignore_unused_variable_warning(m_string);
0757 
0758       // regex_match:
0759       b = global_regex_namespace::regex_match(m_string, m_smatch, e);
0760       ignore_unused_variable_warning(b);
0761       b = global_regex_namespace::regex_match(m_string, m_smatch, e, m_mft);
0762       ignore_unused_variable_warning(b);
0763       b = global_regex_namespace::regex_match(m_string, e);
0764       ignore_unused_variable_warning(b);
0765       b = global_regex_namespace::regex_match(m_string, e, m_mft);
0766       ignore_unused_variable_warning(b);
0767 
0768       // regex_search:
0769       b = global_regex_namespace::regex_search(m_string, m_smatch, e);
0770       ignore_unused_variable_warning(b);
0771       b = global_regex_namespace::regex_search(m_string, m_smatch, e, m_mft);
0772       ignore_unused_variable_warning(b);
0773       b = global_regex_namespace::regex_search(m_string, e);
0774       ignore_unused_variable_warning(b);
0775       b = global_regex_namespace::regex_search(m_string, e, m_mft);
0776       ignore_unused_variable_warning(b);
0777 
0778       // regex_replace:
0779       m_out = global_regex_namespace::regex_replace(m_out, m_in, m_in, e, m_string, m_mft);
0780       m_out = global_regex_namespace::regex_replace(m_out, m_in, m_in, e, m_string);
0781       m_string = global_regex_namespace::regex_replace(m_string, e, m_string, m_mft);
0782       ignore_unused_variable_warning(m_string);
0783       m_string = global_regex_namespace::regex_replace(m_string, e, m_string);
0784       ignore_unused_variable_warning(m_string);
0785 
0786    }
0787 
0788    flag_type m_flags;
0789    string_type m_string;
0790    const sub_match_type m_sub;
0791    match_results_type m_results;
0792    pointer_type m_pointer;
0793    value_type m_char;
0794    const match_results_type m_cresults;
0795    OutIterator m_out;
0796    BidiIterator m_in;
0797    global_regex_namespace::regex_constants::match_flag_type m_mft;
0798    global_regex_namespace::match_results<typename string_type::const_iterator, allocator_architype<global_regex_namespace::sub_match<typename string_type::const_iterator> > > m_smatch;
0799 
0800    RegexConcept();
0801    RegexConcept(const RegexConcept&);
0802    RegexConcept& operator=(const RegexConcept&);
0803 };
0804 
0805 #ifndef BOOST_REGEX_TEST_STD
0806 
0807 template <class M>
0808 struct functor1
0809 {
0810    typedef typename M::char_type char_type;
0811    const char_type* operator()(const M&)const
0812    {
0813       static const char_type c = static_cast<char_type>(0);
0814       return &c;
0815    }
0816 };
0817 template <class M>
0818 struct functor1b
0819 {
0820    typedef typename M::char_type char_type;
0821    std::vector<char_type> operator()(const M&)const
0822    {
0823       static const std::vector<char_type> c;
0824       return c;
0825    }
0826 };
0827 template <class M>
0828 struct functor2
0829 {
0830    template <class O>
0831    O operator()(const M& /*m*/, O i)const
0832    {
0833       return i;
0834    }
0835 };
0836 template <class M>
0837 struct functor3
0838 {
0839    template <class O>
0840    O operator()(const M& /*m*/, O i, regex_constants::match_flag_type)const
0841    {
0842       return i;
0843    }
0844 };
0845 
0846 //
0847 // BoostRegexConcept:
0848 // Test every interface in the Boost implementation:
0849 //
0850 template <class Regex>
0851 struct BoostRegexConcept
0852 {
0853    typedef typename Regex::value_type value_type;
0854    typedef typename Regex::size_type size_type;
0855    typedef typename Regex::flag_type flag_type;
0856    typedef typename Regex::locale_type locale_type;
0857 
0858    // derived test types:
0859    typedef const value_type* pointer_type;
0860    typedef std::basic_string<value_type> string_type;
0861    typedef typename Regex::const_iterator const_iterator;
0862    typedef bidirectional_iterator_archetype<value_type> BidiIterator;
0863    typedef output_iterator_archetype<value_type> OutputIterator;
0864    typedef global_regex_namespace::sub_match<BidiIterator> sub_match_type;
0865    typedef global_regex_namespace::match_results<BidiIterator, allocator_architype<sub_match_type> > match_results_type;
0866    typedef global_regex_namespace::match_results<BidiIterator> match_results_default_type;
0867 
0868    void constraints() 
0869    {
0870       global_regex_namespace::regex_constants::match_flag_type mopts
0871          = global_regex_namespace::regex_constants::match_default
0872          | global_regex_namespace::regex_constants::match_not_bol
0873          | global_regex_namespace::regex_constants::match_not_eol
0874          | global_regex_namespace::regex_constants::match_not_bow
0875          | global_regex_namespace::regex_constants::match_not_eow
0876          | global_regex_namespace::regex_constants::match_any
0877          | global_regex_namespace::regex_constants::match_not_null
0878          | global_regex_namespace::regex_constants::match_continuous
0879          | global_regex_namespace::regex_constants::match_partial
0880          | global_regex_namespace::regex_constants::match_prev_avail
0881          | global_regex_namespace::regex_constants::format_default
0882          | global_regex_namespace::regex_constants::format_sed
0883          | global_regex_namespace::regex_constants::format_perl
0884          | global_regex_namespace::regex_constants::format_no_copy
0885          | global_regex_namespace::regex_constants::format_first_only;
0886 
0887       (void)mopts;
0888 
0889       function_requires<RegexConcept<Regex> >();
0890       const global_regex_namespace::regex_error except(global_regex_namespace::regex_constants::error_collate);
0891       std::ptrdiff_t pt = except.position();
0892       ignore_unused_variable_warning(pt);
0893       const Regex ce, ce2;
0894 #ifndef BOOST_NO_STD_LOCALE
0895       m_stream << ce;
0896 #endif
0897       unsigned i = ce.error_code();
0898       ignore_unused_variable_warning(i);
0899       pointer_type p = ce.expression();
0900       ignore_unused_variable_warning(p);
0901       int i2 = ce.compare(ce2);
0902       ignore_unused_variable_warning(i2);
0903       bool b = ce == ce2;
0904       ignore_unused_variable_warning(b);
0905       b = ce.empty();
0906       ignore_unused_variable_warning(b);
0907       b = ce != ce2;
0908       ignore_unused_variable_warning(b);
0909       b = ce < ce2;
0910       ignore_unused_variable_warning(b);
0911       b = ce > ce2;
0912       ignore_unused_variable_warning(b);
0913       b = ce <= ce2;
0914       ignore_unused_variable_warning(b);
0915       b = ce >= ce2;
0916       ignore_unused_variable_warning(b);
0917       i = ce.status();
0918       ignore_unused_variable_warning(i);
0919       size_type s = ce.max_size();
0920       ignore_unused_variable_warning(s);
0921       s = ce.size();
0922       ignore_unused_variable_warning(s);
0923       const_iterator pi = ce.begin();
0924       ignore_unused_variable_warning(pi);
0925       pi = ce.end();
0926       ignore_unused_variable_warning(pi);
0927       string_type s2 = ce.str();
0928       ignore_unused_variable_warning(s2);
0929 
0930       m_string = m_sub + m_sub;
0931       ignore_unused_variable_warning(m_string);
0932       m_string = m_sub + m_pointer;
0933       ignore_unused_variable_warning(m_string);
0934       m_string = m_pointer + m_sub;
0935       ignore_unused_variable_warning(m_string);
0936       m_string = m_sub + m_string;
0937       ignore_unused_variable_warning(m_string);
0938       m_string = m_string + m_sub;
0939       ignore_unused_variable_warning(m_string);
0940       m_string = m_sub + m_char;
0941       ignore_unused_variable_warning(m_string);
0942       m_string = m_char + m_sub;
0943       ignore_unused_variable_warning(m_string);
0944 
0945       // Named sub-expressions:
0946       m_sub = m_cresults[&m_char];
0947       ignore_unused_variable_warning(m_sub);
0948       m_sub = m_cresults[m_string];
0949       ignore_unused_variable_warning(m_sub);
0950       m_sub = m_cresults[""];
0951       ignore_unused_variable_warning(m_sub);
0952       m_sub = m_cresults[std::string("")];
0953       ignore_unused_variable_warning(m_sub);
0954       m_string = m_cresults.str(&m_char);
0955       ignore_unused_variable_warning(m_string);
0956       m_string = m_cresults.str(m_string);
0957       ignore_unused_variable_warning(m_string);
0958       m_string = m_cresults.str("");
0959       ignore_unused_variable_warning(m_string);
0960       m_string = m_cresults.str(std::string(""));
0961       ignore_unused_variable_warning(m_string);
0962 
0963       typename match_results_type::difference_type diff;
0964       diff = m_cresults.length(&m_char);
0965       ignore_unused_variable_warning(diff);
0966       diff = m_cresults.length(m_string);
0967       ignore_unused_variable_warning(diff);
0968       diff = m_cresults.length("");
0969       ignore_unused_variable_warning(diff);
0970       diff = m_cresults.length(std::string(""));
0971       ignore_unused_variable_warning(diff);
0972       diff = m_cresults.position(&m_char);
0973       ignore_unused_variable_warning(diff);
0974       diff = m_cresults.position(m_string);
0975       ignore_unused_variable_warning(diff);
0976       diff = m_cresults.position("");
0977       ignore_unused_variable_warning(diff);
0978       diff = m_cresults.position(std::string(""));
0979       ignore_unused_variable_warning(diff);
0980 
0981 #ifndef BOOST_NO_STD_LOCALE
0982       m_stream << m_sub;
0983       m_stream << m_cresults;
0984 #endif
0985       //
0986       // Extended formatting with a functor:
0987       //
0988       regex_constants::match_flag_type f = regex_constants::match_default;
0989       OutputIterator out = static_object<OutputIterator>::get();
0990       
0991       functor3<match_results_default_type> func3;
0992       functor2<match_results_default_type> func2;
0993       functor1<match_results_default_type> func1;
0994       
0995       functor3<match_results_type> func3b;
0996       functor2<match_results_type> func2b;
0997       functor1<match_results_type> func1b;
0998 
0999       out = regex_format(out, m_cresults, func3b, f);
1000       out = regex_format(out, m_cresults, func3b);
1001       out = regex_format(out, m_cresults, func2b, f);
1002       out = regex_format(out, m_cresults, func2b);
1003       out = regex_format(out, m_cresults, func1b, f);
1004       out = regex_format(out, m_cresults, func1b);
1005       out = regex_format(out, m_cresults, RW_NS::ref(func3b), f);
1006       out = regex_format(out, m_cresults, RW_NS::ref(func3b));
1007       out = regex_format(out, m_cresults, RW_NS::ref(func2b), f);
1008       out = regex_format(out, m_cresults, RW_NS::ref(func2b));
1009       out = regex_format(out, m_cresults, RW_NS::ref(func1b), f);
1010       out = regex_format(out, m_cresults, RW_NS::ref(func1b));
1011       out = regex_format(out, m_cresults, RW_NS::cref(func3b), f);
1012       out = regex_format(out, m_cresults, RW_NS::cref(func3b));
1013       out = regex_format(out, m_cresults, RW_NS::cref(func2b), f);
1014       out = regex_format(out, m_cresults, RW_NS::cref(func2b));
1015       out = regex_format(out, m_cresults, RW_NS::cref(func1b), f);
1016       out = regex_format(out, m_cresults, RW_NS::cref(func1b));
1017       m_string += regex_format(m_cresults, func3b, f);
1018       m_string += regex_format(m_cresults, func3b);
1019       m_string += regex_format(m_cresults, func2b, f);
1020       m_string += regex_format(m_cresults, func2b);
1021       m_string += regex_format(m_cresults, func1b, f);
1022       m_string += regex_format(m_cresults, func1b);
1023       m_string += regex_format(m_cresults, RW_NS::ref(func3b), f);
1024       m_string += regex_format(m_cresults, RW_NS::ref(func3b));
1025       m_string += regex_format(m_cresults, RW_NS::ref(func2b), f);
1026       m_string += regex_format(m_cresults, RW_NS::ref(func2b));
1027       m_string += regex_format(m_cresults, RW_NS::ref(func1b), f);
1028       m_string += regex_format(m_cresults, RW_NS::ref(func1b));
1029       m_string += regex_format(m_cresults, RW_NS::cref(func3b), f);
1030       m_string += regex_format(m_cresults, RW_NS::cref(func3b));
1031       m_string += regex_format(m_cresults, RW_NS::cref(func2b), f);
1032       m_string += regex_format(m_cresults, RW_NS::cref(func2b));
1033       m_string += regex_format(m_cresults, RW_NS::cref(func1b), f);
1034       m_string += regex_format(m_cresults, RW_NS::cref(func1b));
1035 
1036       out = m_cresults.format(out, func3b, f);
1037       out = m_cresults.format(out, func3b);
1038       out = m_cresults.format(out, func2b, f);
1039       out = m_cresults.format(out, func2b);
1040       out = m_cresults.format(out, func1b, f);
1041       out = m_cresults.format(out, func1b);
1042       out = m_cresults.format(out, RW_NS::ref(func3b), f);
1043       out = m_cresults.format(out, RW_NS::ref(func3b));
1044       out = m_cresults.format(out, RW_NS::ref(func2b), f);
1045       out = m_cresults.format(out, RW_NS::ref(func2b));
1046       out = m_cresults.format(out, RW_NS::ref(func1b), f);
1047       out = m_cresults.format(out, RW_NS::ref(func1b));
1048       out = m_cresults.format(out, RW_NS::cref(func3b), f);
1049       out = m_cresults.format(out, RW_NS::cref(func3b));
1050       out = m_cresults.format(out, RW_NS::cref(func2b), f);
1051       out = m_cresults.format(out, RW_NS::cref(func2b));
1052       out = m_cresults.format(out, RW_NS::cref(func1b), f);
1053       out = m_cresults.format(out, RW_NS::cref(func1b));
1054 
1055       m_string += m_cresults.format(func3b, f);
1056       m_string += m_cresults.format(func3b);
1057       m_string += m_cresults.format(func2b, f);
1058       m_string += m_cresults.format(func2b);
1059       m_string += m_cresults.format(func1b, f);
1060       m_string += m_cresults.format(func1b);
1061       m_string += m_cresults.format(RW_NS::ref(func3b), f);
1062       m_string += m_cresults.format(RW_NS::ref(func3b));
1063       m_string += m_cresults.format(RW_NS::ref(func2b), f);
1064       m_string += m_cresults.format(RW_NS::ref(func2b));
1065       m_string += m_cresults.format(RW_NS::ref(func1b), f);
1066       m_string += m_cresults.format(RW_NS::ref(func1b));
1067       m_string += m_cresults.format(RW_NS::cref(func3b), f);
1068       m_string += m_cresults.format(RW_NS::cref(func3b));
1069       m_string += m_cresults.format(RW_NS::cref(func2b), f);
1070       m_string += m_cresults.format(RW_NS::cref(func2b));
1071       m_string += m_cresults.format(RW_NS::cref(func1b), f);
1072       m_string += m_cresults.format(RW_NS::cref(func1b));
1073 
1074       out = regex_replace(out, m_in, m_in, ce, func3, f);
1075       out = regex_replace(out, m_in, m_in, ce, func3);
1076       out = regex_replace(out, m_in, m_in, ce, func2, f);
1077       out = regex_replace(out, m_in, m_in, ce, func2);
1078       out = regex_replace(out, m_in, m_in, ce, func1, f);
1079       out = regex_replace(out, m_in, m_in, ce, func1);
1080       out = regex_replace(out, m_in, m_in, ce, RW_NS::ref(func3), f);
1081       out = regex_replace(out, m_in, m_in, ce, RW_NS::ref(func3));
1082       out = regex_replace(out, m_in, m_in, ce, RW_NS::ref(func2), f);
1083       out = regex_replace(out, m_in, m_in, ce, RW_NS::ref(func2));
1084       out = regex_replace(out, m_in, m_in, ce, RW_NS::ref(func1), f);
1085       out = regex_replace(out, m_in, m_in, ce, RW_NS::ref(func1));
1086       out = regex_replace(out, m_in, m_in, ce, RW_NS::cref(func3), f);
1087       out = regex_replace(out, m_in, m_in, ce, RW_NS::cref(func3));
1088       out = regex_replace(out, m_in, m_in, ce, RW_NS::cref(func2), f);
1089       out = regex_replace(out, m_in, m_in, ce, RW_NS::cref(func2));
1090       out = regex_replace(out, m_in, m_in, ce, RW_NS::cref(func1), f);
1091       out = regex_replace(out, m_in, m_in, ce, RW_NS::cref(func1));
1092 
1093       functor3<match_results<typename string_type::const_iterator> > func3s;
1094       functor2<match_results<typename string_type::const_iterator> > func2s;
1095       functor1<match_results<typename string_type::const_iterator> > func1s;
1096       m_string += regex_replace(m_string, ce, func3s, f);
1097       m_string += regex_replace(m_string, ce, func3s);
1098       m_string += regex_replace(m_string, ce, func2s, f);
1099       m_string += regex_replace(m_string, ce, func2s);
1100       m_string += regex_replace(m_string, ce, func1s, f);
1101       m_string += regex_replace(m_string, ce, func1s);
1102       m_string += regex_replace(m_string, ce, RW_NS::ref(func3s), f);
1103       m_string += regex_replace(m_string, ce, RW_NS::ref(func3s));
1104       m_string += regex_replace(m_string, ce, RW_NS::ref(func2s), f);
1105       m_string += regex_replace(m_string, ce, RW_NS::ref(func2s));
1106       m_string += regex_replace(m_string, ce, RW_NS::ref(func1s), f);
1107       m_string += regex_replace(m_string, ce, RW_NS::ref(func1s));
1108       m_string += regex_replace(m_string, ce, RW_NS::cref(func3s), f);
1109       m_string += regex_replace(m_string, ce, RW_NS::cref(func3s));
1110       m_string += regex_replace(m_string, ce, RW_NS::cref(func2s), f);
1111       m_string += regex_replace(m_string, ce, RW_NS::cref(func2s));
1112       m_string += regex_replace(m_string, ce, RW_NS::cref(func1s), f);
1113       m_string += regex_replace(m_string, ce, RW_NS::cref(func1s));
1114    }
1115 
1116    std::basic_ostream<value_type> m_stream;
1117    sub_match_type m_sub;
1118    pointer_type m_pointer;
1119    string_type m_string;
1120    const value_type m_char;
1121    match_results_type m_results;
1122    const match_results_type m_cresults;
1123    BidiIterator m_in;
1124 
1125    BoostRegexConcept();
1126    BoostRegexConcept(const BoostRegexConcept&);
1127    BoostRegexConcept& operator=(const BoostRegexConcept&);
1128 };
1129 
1130 #endif // BOOST_REGEX_TEST_STD
1131 
1132 }
1133 
1134 #endif