构造一个值对象。
static value_type make_value(key_type key);
参数
- 键
可以使用的键值。
备注
成员函数返回键为 key的 value_type 对象。 使用它创建一个适合其他成员函数使用的对象。
示例
// cliext_hash_multiset_make_value.cpp
// compile with: /clr
#include <cliext/hash_set>
typedef cliext::hash_multiset<wchar_t> Myhash_multiset;
int main()
{
Myhash_multiset c1;
c1.insert(Myhash_multiset::make_value(L'a'));
c1.insert(Myhash_multiset::make_value(L'b'));
c1.insert(Myhash_multiset::make_value(L'c'));
// display contents " a b c"
for each (Myhash_multiset::value_type elem in c1)
System::Console::Write(" {0}", elem);
System::Console::WriteLine();
return (0);
}
要求
标头: <cliext/hash_set>
命名空间: cliext