optimized create_match() for char
@@ -67,6 +67,24 @@ | ||
67 | 67 | } |
68 | 68 | |
69 | 69 | template<class Iterator1T, class Iterator2T> |
70 | + static boost::spirit::tree_match<IteratorT,NodeFactoryT,char> | |
71 | + create_match( | |
72 | + std::size_t length, | |
73 | + const char& val, | |
74 | + const Iterator1T& first, | |
75 | + const Iterator2T& last) | |
76 | + { | |
77 | + typedef typename common_tree_match_policy_::tree_policy_t tree_policy_t; | |
78 | + | |
79 | + boost::spirit::tree_match<IteratorT,NodeFactoryT,char> tmp( | |
80 | + length, | |
81 | + tree_policy_t::create_node(length, first, last, true) | |
82 | + ); | |
83 | + tmp.value(val); | |
84 | + return tmp; | |
85 | + } | |
86 | + | |
87 | + template<class Iterator1T, class Iterator2T> | |
70 | 88 | static boost::spirit::tree_match< |
71 | 89 | IteratorT, |
72 | 90 | NodeFactoryT, |