cplusplus.com cplusplus.com
cplusplus.com   C++ : Reference : Strings library : string : get_allocator
  Search:
- -
C++
Information
Documentation
Reference
Articles
Sourcecode
Forums
Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
Miscellaneous
Strings library
char_traits
classes:
· string
global functions:
· getline
· operator+
· operator<<
· operator>>
· comparison operators
· swap
string
string::string
member constants:
· string::npos
member functions:
· string::append
· string::assign
· string::at
· string::begin
· string::capacity
· string::clear
· string::compare
· string::copy
· string::c_str
· string::data
· string::empty
· string::end
· string::erase
· string::find
· string::find_first_not_of
· string::find_first_of
· string::find_last_not_of
· string::find_last_of
· string::get_allocator
· string::insert
· string::length
· string::max_size
· string::operator+=
· string::operator=
· string::operator[]
· string::push_back
· string::rbegin
· string::rend
· string::replace
· string::reserve
· string::resize
· string::rfind
· string::size
· string::substr
· string::swap

-

string::get_allocator public member function
allocator<char> get_allocator( ) const;

Get allocator

Returns the allocator object used to constuct the object.

Allocators define memory allocation models. For string objects this is an object of the standard allocator type for char elements: allocator<char>, which is value independent, but basic_string objects may specify different allocator types as a template parameter of the class template, and different values for them on object construction.

Parameters

none

Return Value

The allocator value.

Basic template member declaration

( basic_string<charT,traits,Allocator> )
typedef Allocator allocator_type;
allocator_type get_allocator() const;

Home page | Privacy policy
© cplusplus.com, 2000-2008 - All rights reserved - v2.2
Spotted an error? contact us