{"blog_url":"https://inamori.hateblo.jp/","provider_url":"https://hatena.blog","image_url":null,"author_url":"https://blog.hatena.ne.jp/inamori/","blog_title":"inamori\u2019s diary","categories":["C++"],"height":"190","provider_name":"Hatena Blog","description":"takewhile\u306f\u3001\u53d9\u8ff0\u95a2\u6570\u304ctrue\u3067\u3042\u308b\u9650\u308a\u5024\u304c\u3042\u308c\u3070\u51fa\u3057\u7d9a\u3051\u307e\u3059\u3002 template<typename T, typename U> class cTakeWhile : public cIterable<T> { U pred; shared_ptr<cIterable<T>> gen; public: cTakeWhile(U p, shared_ptr<cIterable<T>> g) : pred(p), gen(g) { } bool exists_next() { return gen->exists_next() && pred(gen->value()); } T va\u2026","type":"rich","author_name":"inamori","version":"1.0","width":"100%","published":"2010-08-29 00:00:00","url":"https://inamori.hateblo.jp/entry/20100829/p1","title":"takewhile","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F20100829%2Fp1\" title=\"takewhile - inamori\u2019s diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}