43 template<
typename InputIterator1,
typename InputIterator2>
45 ( InputIterator1 pattern_first, InputIterator1 pattern_last,
46 InputIterator2
first, InputIterator2 last,
47 typename InputIterator1::value_type any_sequence,
48 typename InputIterator1::value_type zero_or_one,
49 typename InputIterator1::value_type any )
53 if ( (pattern_first == pattern_last) || (first == last) )
55 result = (first == last);
57 for ( ; result && (pattern_first != pattern_last); ++ pattern_first )
59 (*pattern_first == any_sequence) || (*pattern_first == zero_or_one);
61 else if ( *pattern_first == any_sequence )
64 ( pattern_first + 1, pattern_last, first, last, any_sequence, zero_or_one,
67 ( pattern_first, pattern_last, first + 1, last, any_sequence, zero_or_one,
69 else if ( *pattern_first == zero_or_one )
72 ( pattern_first + 1, pattern_last, first, last, any_sequence, zero_or_one,
75 ( pattern_first + 1, pattern_last, first + 1, last, any_sequence,
77 else if ( (*pattern_first == zero_or_one) || (*pattern_first == *first) )
80 ( pattern_first + 1, pattern_last, first + 1, last, any_sequence,
100 template<
typename InputIterator1,
typename InputIterator2>
102 ( InputIterator1 pattern_first, InputIterator1 pattern_last,
103 InputIterator2 first, InputIterator2 last,
104 typename InputIterator1::value_type any_sequence,
105 typename InputIterator1::value_type zero_or_one,
106 typename InputIterator1::value_type any )
111 while ( !stop && (pattern_first != pattern_last) && (first != last) )
112 if ( (*pattern_first == any_sequence) || (*pattern_first == zero_or_one) )
114 else if ( *pattern_first == any )
119 else if ( *pattern_first == *first )