/* Check cf5-opt.vim defs. VIM: let g:lcppflags="-std=c++11 -O2 -pthread" VIM: let g:wcppflags="/O2 /EHsc /DWIN32" VIM: let g:cppflags=g:Iboost.g:Itbb VIM: let g:ldflags=g:Lboost.g:Ltbb.g:tbbmalloc.g:tbbmproxy VIM: let g:ldlibpath=g:Bboost.g:Btbb VIM: let g:argv="" VIM-: let g:cf5output=0 */ #include #include #include //#include #include #include #include #include struct entry { std::string d_sessionId; std::string d_curveId; std::string key3; }; typedef boost::multi_index::ordered_unique< boost::multi_index::identity > index_by_entry; struct ByCurveId {}; typedef boost::multi_index::hashed_unique< boost::multi_index::tag, boost::multi_index::member< entry, std::string, &entry::d_curveId > > index_ByCurveId; struct BySessionId {}; typedef boost::multi_index::hashed_unique< boost::multi_index::tag, boost::multi_index::member< entry, std::string, &entry::d_sessionId > > index_BySessionId; typedef boost::multi_index_container< entry, boost::multi_index::indexed_by< //boost::multi_index::sequenced<>, //index_by_entry, index_BySessionId, index_ByCurveId > > my_multi_index_container_type; int main ( void ) {try{ my_multi_index_container_type c; if ( c.get().find( "tutuc" ) == c.get().end() ) { std::cout << "no tutuc\n"; } return 0; } catch ( const std::exception& e ) { std::cerr << std::endl << "std::exception(\"" << e.what() << "\")." << std::endl; return 2; } catch ( ... ) { std::cerr << std::endl << "unknown exception." << std::endl; return 1; }}