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;
}
我想检查'Name'是否存在。
非常感谢 – 2012-04-05 07:16:28
find()函数在哪里记录?提升文档是一团糟! – DBedrenko 2016-06-10 09:10:15
find()函数属于定义地图类型时使用的集合类型。在这个例子中,它是'set_of',这是记录[这里](http://www.boost.org/doc/libs/release/libs/bimap/doc/html/boost_bimap/reference/set_of_reference.html)。 – 2016-06-10 09:16:02