hash_multiset::const_reference (STL/CLR)
元素的常量引用的类型。
typedef value_type% const_reference;
备注
这个类型描述了一个元素的常量引用。
示例
// cliext_hash_multiset_const_reference.cpp
// compile with: /clr
#include <cliext/hash_set>
typedef cliext::hash_multiset<wchar_t> Myhash_multiset;
int main()
{
Myhash_multiset c1;
c1.insert(L'a');
c1.insert(L'b');
c1.insert(L'c');
// display initial contents " a b c"
Myhash_multiset::const_iterator cit = c1.begin();
for (; cit != c1.end(); ++cit)
{ // get a const reference to an element
Myhash_multiset::const_reference cref = *cit;
System::Console::Write(" {0}", cref);
}
System::Console::WriteLine();
return (0);
}
要求
标头: <cliext/hash_set>
命名空间: cliext