私がこのようなオブジェクトを持っている場合:
struct Bar {
std::string const& property();
};
次のように、マルチインデックスコンテナを作成できます。
struct tag_prop {};
typedef boost::multi_index_container<
Bar,
boost::multi_index::indexed_by<
boost::multi_index::ordered_non_unique<
boost::multi_index::tag<tag_prop>,
boost::multi_index::const_mem_fun<
Bar, const std::string&, &Bar::property
>
>
>
, ... other indexes
> BarContainer;
しかし、私がこのようなクラスを持っている場合:
struct Foo {
Bar const& bar();
};
オブジェクト.bar().property()
のコンテナのインデックスを作成するにはどうすればよいですか?Foo
通常、への呼び出しをネストboost::bind
しますが、マルチインデックスコンテナのコンテキストでそれを機能させる方法を理解できません。