basic_string::allocator_type
Un tipo que representa la clase del asignador de un objeto string.
typedef Allocator allocator_type;
Comentarios
El tipo es un sinónimo para el parámetro Allocatorde la plantilla.
Ejemplo
// 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
}
Requisitos
Encabezado: <string>
Espacio de nombres: std