2012-05-21から1日間の記事一覧

Boost.Xpressive で対応した文字で一括置換

少し前にコメントで教えていただいたので覚書。 [ソース] #include <boost/xpressive/xpressive.hpp> #include <boost/xpressive/regex_actions.hpp> #include <map> int main(){ namespace x = boost::xpressive; using x::_; std::map<std::string, std::string> m = { { "(", "[ " }, { ")", " ]" }, }; x::local<std::string const*> pstr; x::sr…</std::string></std::string,></map></boost/xpressive/regex_actions.hpp></boost/xpressive/xpressive.hpp>