• R/O
  • SSH
  • HTTPS

hamigaki: 提交


Commit MetaInfo

修訂1720 (tree)
時間2008-06-04 23:11:28
作者hamigaki

Log Message

optimized create_match() for char

Change Summary

差異

--- sandbox/trunk/hamigaki/bjam2/util/parse_tree.hpp (revision 1719)
+++ sandbox/trunk/hamigaki/bjam2/util/parse_tree.hpp (revision 1720)
@@ -67,6 +67,24 @@
6767 }
6868
6969 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>
7088 static boost::spirit::tree_match<
7189 IteratorT,
7290 NodeFactoryT,
Show on old repository browser