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 asignadorde 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: <cadena>

espacio de nombres: std

Vea también

Referencia

basic_string Class