2010-12-09から1日間の記事一覧

Boost.Spirit.Qi 文字列を要素とするカンマ区切り文字列のパース

C++

ちょっと嵌ったのでメモ。 #include <iostream> #include <vector> #include <string> #include <boost/spirit/include/qi.hpp> #include <boost/range/algorithm/for_each.hpp> #include <boost/lambda/lambda.hpp> std::vector<std::string> parse_string_csv(const std::string& s) { namespace qi = boost::spirit::qi; std::vector…</std::string></boost/lambda/lambda.hpp></boost/range/algorithm/for_each.hpp></boost/spirit/include/qi.hpp></string></vector></iostream>