3
필자는 bimap을 가지고 있습니다. 내 bimap에 키가 있는지 확인하고 싶습니다. 어떻게하면 돼? 내 bimap은 다음과 같습니다.Cpp - 부스트 bimap에 키가 있는지 확인하십시오.
namespace bimap
{
struct Name{};
struct ID{};
typedef
boost::bimaps::bimap<
boost::bimaps::set_of<
boost::bimaps::tagged<
unsigned short
, ID
>
>,
boost::bimaps::set_of<
boost::bimaps::tagged<
std::string
, Name
>
>
>
name_index_bimap;
}
'이름'이 존재하는지 확인하고 싶습니다.
감사합니다. –
'find()'함수는 어디에 문서화되어 있습니까? 부스트 문서가 엉망입니다! – DBedrenko
'find()'함수는 맵 타입을 정의 할 때 사용 된 콜렉션 타입에 속한다. 이 예제에서는'set_of'가 있습니다. [here] (http://www.boost.org/doc/libs/release/libs/bimap/doc/html/boost_bimap/reference/set_of_reference.html)에 설명되어 있습니다. –