2008-10-31から1日間の記事一覧

VC++10 CTPのラムダ式でメンバ変数を参照キャプチャ

#include <iostream> #include <functional> using namespace std; using namespace std::tr1; class hoge { function<void()> func_; int id_; public: hoge() : id_(10) { func_ = [this]{ ++id_; }; } void call() const { func_(); cout << id_ << endl; } }; int main() { hoge h; h.c</void()></functional></iostream>…

VC++10はいろいろ実装されない

Visual C++ Team Blog - Lambdas, auto, and static_assert: C++0x Features in VC10, Part 1のコメント欄から 【実装されない】 ・Range-base for文 コンセプトが実装されないからそりゃそーだ。(コンセプトは実装するのに1年はかかるんだとか) VC++10では…