2008-04-07から1日間の記事一覧

FC++ take

C++

リストから先頭N個を取得する #include <iostream> #include <iterator> #include <algorithm> #include <boost/fcpp/prelude.hpp> using namespace std; using namespace boost::fcpp; int main() { list<int> ls = take(5, enum_from(1)); // 1,2,3,4,5,6,7,8,9,...の無限リストから先頭5個を取得 copy(ls.begin(), ls.e</int></boost/fcpp/prelude.hpp></algorithm></iterator></iostream>…

FC++ 遅延リスト

C++

enum_from を使用して無限リストを作成する引数は連番の開始値 #include <iostream> #include <iterator> #include <algorithm> #include <boost/fcpp/prelude.hpp> using namespace std; using namespace boost::fcpp; int main() { list<int> ls = enum_from(1); // 1, 2, 3...の無限リストを作成 copy(ls.begin(), ls.e</int></boost/fcpp/prelude.hpp></algorithm></iterator></iostream>…

FC++ は変態

C++

FC++(Functional Programming in C++) のサンプルコードをチラッと見ましたが・・・変態だー Boost.FC++ FC++を使うには、ここから fcpp1.zip (Boost 仕様の方)をダウンロードして Boost のインストール先に解凍してください さて、遊んでみよう FC++ まとめ

Visual C++ 2008 Feature Pack リリース

Visual C++ 2008 Feature Pack Final Release が公開されました 英語版 Visual Studio 2008 の Standard Edition 以上を持っている方はお試しあれ 正式には Visual Studio 2008 SP1 としてリリースされるので日本語対応は SP1 からとなります

for each 文で参照を使いたい

現在、Microsoft Connect で以下の提案を行っています フィードバック:C++ for each文で参照を使いたい 同意してくださる方がコメントやレート(☆)を付けてくれると Visual Studio の各開発チーム内での重要度が上がるそうなので是非ご協力お願いします バグ…