2009-11-26から1日間の記事一覧

Boost.MultiIndexで複数のキーを持つ辞書 & インデックスを指定する2つの方法

C++

これがBoost.MultiIndexの最もよく使われるであろうユースケース。 MultiIndexのインデックス指定方法は2つあり、まずはインデックスを整数値で指定する方法。 #include <iostream> #include <string> #include <algorithm> #include <boost/mem_fn.hpp> #include <boost/multi_index_container.hpp> #include <boost/multi_index/member.hpp> #include </boost/multi_index/member.hpp></boost/multi_index_container.hpp></boost/mem_fn.hpp></algorithm></string></iostream>