basic_string::allocator_type
表示字符串对象的分配器选件类的类型。
typedef Allocator allocator_type;
备注
该类型是模板参数的 Allocator同义词。
示例
// basic_string_allocator_type.cpp
// compile with: /EHsc
#include <string>
#include <iostream>
int main( )
{
using namespace std;
// The following lines declare objects
// that use the default allocator.
string s1;
basic_string <char>::allocator_type xchar = s1.get_allocator( );
// You can now call functions on the allocator class xchar used by s1
}
要求
标头: <string>
命名空间: std