2007-06-02から1日間の記事一覧

stream parser

以前、stringstream で簡単 split という日記を書いたのですが、もうちょっと直感的な構文を使えないかと思い、実験してみました。 #include <iostream> #include <string> #include <sstream> template <typename T> struct string_to_any { void convert(const std::string& from, T& to) const { </typename></sstream></string></iostream>…